Wine can't run applications anymore after emerging xorg-x11-6.8.2-r3. Re-emerging wine does not help. Here is the error message: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 12783 Current serial number in output stream: 12785 emerge info: Portage 2.0.52-r1 (default-linux/x86/2004.2/gcc34, gcc-3.4.4, glibc-2.3.5-r1, 2. 6.13-gentoo-r1 i686) ================================================================= System uname: 2.6.13-gentoo-r1 i686 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.0_pre8 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r1, 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share /config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/ mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch http://mirror.switch.ch/ftp/mirro r/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.math.bme.h u http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp-stud.fht-essli ngen.de/pub/Mirrors/gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X Xaw3d a52 aac aalib acl acpi adns aim alsa amuled apm a rts audiofile avi bcmath berkdb bidi bindist bitmap-fonts bonobo bootsplash bzip 2 bzlib cairo cdda cddb cdparanoia cdr cjk codecs cpdflib crypt ctype cups curl curlwrappers dbus dbx dga dio divx4linux dmx dpms dvd dvdr dvdread eds effects e mboss encode erandom escreen esd estraier etwin exif extras fam fbcon ffmpeg fft w firefox flac flash font-server foomaticdb fortran freetts freetype ftp gd gdbm gif gimpprint gl glibc-compat20 glibc-omitfp glitz gnome gnutls gpm gstreamer g tk gtk2 gtkhtml guile iconv icq idn ieee1394 imagemagick imap imlib inkjar ipv6 jabber java javascript joystick jpeg jpeg2k junit kde kdeenablefinal kqemu ladcc a lcms libcaca libedit libg++ libsamplerate libwww live mad maildir matroska mbr ola memlimit mhash mikmod mime ming mmx mmx2 mng motif mozdevelop mozilla moznoc ompose moznoirc mozp3p mozsvg mp3 mpeg mplayer ncurses network nls nocd nptl nvi dia offensive ogg oggvorbis openal openexr opengl oscar oss pam pdflib perl phys fs pie plotutils plugin png portaudio posix ppds python qemu-fast qt quicktime r eadline real remote rtc samba sdk sdl session shared sharedmem silverxp slang sl p smtp sockets softmmu soundtouch speex spell sqlite sse sse2 ssl startup-notifi cation stats stream svg szip tcltk tcpd tetex theora threads thumbnail tidy tiff transcode truetype truetype-fonts type1-fonts unicode usb userlocales videos vi sualization vorbis win32codecs wmf wxgtk1 wxwindows xfs xine xml xml2 xmms xosd xpm xrandr xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS
This is almost definitely related to the security patch applied in -r3. It'd be nice to know if this problem exists in 6.8.99.15. Works fine for me in modular.
I'm using now wine with xorg-6.2.8-r3 (before with and after without the xorg patch that causes transparency problem with openoffice and wine). So it could be something related to particular USE or CFLAGS. If you need more info (emerge info or CFLAGS), I'm here (tomorrow! :D).
Okay, I just compiled wine from cvs and it works flawless, so maybe there's a patch somewhere that will make 20050830 work again.
This affects 6.8.99.15-r1 too.
wine = 20050830 xorg-x11 = 6.8.2-r3 Familiar program now croaks with this error. Worked fine up to -r2. HTH peter@mars /mnt/data/data/PC Coach $ wine pccoach X Error of failed request: BadAlloc (insufficient resources f Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 12783 Current serial number in output stream: 12785 ----- # emerge info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1, 2.6.1 2-gentoo-r10 i686) ================================================================= System uname: 2.6.12-gentoo-r10 i686 AMD Athlon(tm) XP 2800+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer" DISTDIR="/mnt/src/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.tds.net/g entoo http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://206.75.217.180/ " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apm arts artswrappersuid avi berkdb bitmap-fonts cdr crypt cups curl eds emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gpm gst reamer gtk gtk2 imagemagick imlib ipv6 java jpeg kde ldap libg++ libwww mad mikm od motif mozilla mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis win32codecs xine xml2 xmms xv zl ib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Oh yes, I did try and re-emerge wine even though it appeared no libraries were out of sync. revdev-rebuild -p suggested nothing. Even after wine was rebuilt, same thing.
Francesco: ya, emerge info might be useful
Same issue, here are mine emerge info: Portage 2.0.52-r1 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.5-r1, 2.6.13-gentoo-r1 i686) ================================================================= System uname: 2.6.13-gentoo-r1 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.12.0_pre8 dev-lang/python: 2.3.5-r1, 2.4.1-r1 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo/ http://ftp.heanet.ie/pub/gentoo/ http://gentoo.chem.wisc.edu/gentoo/" LANG="it_IT@euro" LINGUAS="it" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex 3dnowext X aalib acl acpi acpi4linux alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl divx4linux dvb dvd dvdr dvdread eds emboss encode esd fam flac foomaticdb fortran gdbm gif gimp gnome gphoto2 gpm gstreamer gtk gtk2 guile hal imagemagick imlib java joystick jpeg kde libg++ libwww lirc mad mikmod mmx mmx2 mmxext motif mp3 mpeg ncurses nls nptl nptlonly offensive ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline scanner sdl spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts usb v4l v4l2 vorbis win32codecs wxgtk1 xine xml xml2 xmms xv xvid xvmc zlib zvbi linguas_it userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Additional info: MSIE under wine continued to launch fine. I suppose the error is in one of the DLLs native to wine. Since IE pulls in a bunch of pure M$ DLL files, I assume that's the source of the error. For example, running $ progman or $ winecfg also crashes. Looking at the last patch, it says: + if (stuff->width > 32767 || stuff->height > 32767) + { + /* It is allowed to try and allocate a pixmap which is larger than + * 32767 in either dimension. However, all of the framebuffer code + * is buggy and does not reliably draw to such big pixmaps, basically + * because the Region data structure operates with signed shorts for + * the rectangles in it. + * + * Furthermore, several places in the X server compute the size in + * bytes of the pixmap and try to store it in an integer. This + * integer can overflow and cause the allocated size to be much + * smaller. + * + * So, such big pixmaps are rejected here with a BadAlloc + */ + return BadAlloc; So, it most likely is some bug in wine requesting a bad value which was allowed to go before. I recompiled wine with USE=debug, and ran a trace on the affected program. Here is the result with the simple winecfg program: trace:loaddll:load_builtin_dll Loaded module L"c:\\windows\\system\\winex11.drv" : builtin trace:loaddll:load_builtin_dll Loaded module L"c:\\windows\\system\\imm32.dll" : builtin X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 12783 Current serial number in output stream: 12785 I tried using a native version of imm32.dll but it still crashed. So, this leads me to think there is a problem with winex11.drv. I'll go hunt around on the wine bug list and see what's doing there. If nothing, maybe I will post these results.
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-2495, which is the patch that's causing the problems has a curious notation on it's main page: "This is a candidate for inclusion in the CVE list, which standardizes names for security problems. It must be reviewed and accepted by the CVE Editorial Board before it can be added into CVE. Therefore, this candidate may be modified or even rejected in the future." and "** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided." So, I wonder. Is it even official? Obviously removing the patch would revert us back to r2 (which is what I am doing). There is no source listing anywhere and I question whether gentoo jumped the gun to apply this. It broke wine.
https://bugs.freedesktop.org/show_bug.cgi?id=594
(In reply to comment #11) > https://bugs.freedesktop.org/show_bug.cgi?id=594 THIS PATCH IS NOT THE SAME! There are differences. For example: -+ if (paddedWidth > 32767 || height > 32767 || depth > 4) -+ return NullPixmap; -+ ++ if (paddedWidth > 32767 || height > 32767) ++ return NullPixmap; and paddedWidth = PixmapBytePad(width, depth); + -+ if (paddedWidth / 4 > 32767 || height > 32767) -+ return NullPixmap; ++ if (paddedWidth > 32767 || height > 32767) ++ return NullPixmap; Seems like there was some discussion on dividing by 4. These are absent in the CAN patch with Gentoo.
xorg-x11-6.8.2-r2 was removed. However, applying this patch restores it (just changing the patch file). This disables whatever the CAN patch was supposed to do, so user beware. However, this restores wine functionality. I installed in /usr/local/portage and masked r3 in package.mask. HTH --- /usr/portage/x11-base/xorg-x11/xorg-x11-6.8.2-r3.ebuild 2005-09-12 10:15:49.000000000 -0400 +++ xorg-x11-6.8.2-r2.ebuild 2005-09-15 09:02:54.000000000 -0400 @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.2-r3.ebuild,v 1.1 2005/09/12 14:15:49 seemant Exp $ +# $Header: $ # Set TDFX_RISKY to "yes" to get 16-bit, 1024x768 or higher on low-memory # voodoo3 cards. @@ -38,7 +38,7 @@ # IUSE_INPUT_DEVICES="synaptics wacom" FILES_VER="0.8" -PATCH_VER="0.1.10.1" +PATCH_VER="0.1.9" XCUR_VER="0.3.1" XFSFT_ENC_VER="0.1"
Same problem here. Still, before emerging 6.8.2-r3 I made a binary package of 6.8.2-r2. Unfortunately it seems the binary package is useless because "emerge -k" needs the 6.8.2-r2 ebuild, which disappeared from Portage tree. Please don't remove ebuild versions too fast.. Why not keep 6.8.2-r2 for 1-2 months, in case of any bugs ? It would be good..
(In reply to comment #13) > However, this restores wine functionality. Wine from CVS works together with the patch, maybe adding whatever they changed to 20050830 is enough.
(In reply to comment #15) > (In reply to comment #13) > > However, this restores wine functionality. > > Wine from CVS works together with the patch, maybe adding whatever they changed > to 20050830 is enough. Maybe, but I am concerned that the patch gentoo has does not match the patch referenced. Also, to fork off the wine tree for cvs is not something I care to experiment with at the moment :)
(In reply to comment #12) > (In reply to comment #11) > > https://bugs.freedesktop.org/show_bug.cgi?id=594 > > THIS PATCH IS NOT THE SAME! There are differences. For example: Agreed. Comment #25 of the fdo bug explains why the /4 and depth check should exist. Most likely it is the missing /4 causing the problem. Unfortunately I'm at school right now and cannot commit the changes required, and I think spyderous' box is still busted. I will hopefully have a chance to make the required changes in 6-7 hours, but no promises. Since that patch is supposedly against 4.3 I'll have to hand-verify against fdo's changes before committing, so this may not happen tonight. Thanks for your patience. Until then, if someone could test the proper patch (you'll have to hand-edit ours) and make sure it works it would be appreciated.
(In reply to comment #14) > Unfortunately it seems the binary package is useless because "emerge -k" needs > the 6.8.2-r2 ebuild, which disappeared from Portage tree. Use -K to force binary. > Please don't remove ebuild versions too fast.. Why not keep 6.8.2-r2 for 1-2 > months, in case of any bugs ? It would be good.. Because fixing exploitable security vulnerabilities is most important.
(In reply to comment #18) > > Please don't remove ebuild versions too fast.. Why not keep 6.8.2-r2 for 1-2 > > months, in case of any bugs ? It would be good.. > > Because fixing exploitable security vulnerabilities is most important. Well, in this case, the patch was incorrect and broke certain functionality. This is not even listed in CVE yet. I agree. The removal of -r2 was hasty and there appeared not to have been sufficient time to test. If not 1-2 months, maybe a few weeks. This was not an error that would take down a system, IMHO.
(In reply to comment #19) > (In reply to comment #18) > > > Please don't remove ebuild versions too fast.. Why not keep 6.8.2-r2 for 1-2 > > > months, in case of any bugs ? It would be good.. > > > > Because fixing exploitable security vulnerabilities is most important. > > Well, in this case, the patch was incorrect and broke certain functionality. that sucks, but i'd prefer to have lost a little functionality rather than someone getting unauthorized resource access. rather than complaining, why dont you test the patch that was accepted upstream and see if it even makes a difference. who knows, it might not matter at all. > This is not even listed in CVE yet. you obviously havent dealt with CVE before ... all new entries are treated like this and can take a while before it's listed ... one of the significant points of CVE is that it does not list duplicated vulnerabilities in which case, new filed reports will be removed when they are found to be duplicated. > I agree. The removal of -r2 was hasty and > there appeared not to have been sufficient time to test. If not 1-2 months, > maybe a few weeks. This was not an error that would take down a system, IMHO. no, but having a broken wine wont prevent your system from being usuable either
> Until then, if someone could test the proper patch > (you'll have to hand-edit ours) and make sure it > works it would be appreciated. I just tested it (see attachment), wine seems to behave normal with the patch accepted by the x.org people. Note: Maybe I did something wrong with the patch below, never did this before :)
Created attachment 68543 [details, diff] Fixed (hopefully) patch for CAN-2005-2495 This is based on https://bugs.freedesktop.org/show_bug.cgi?id=594
thanks, rerouting to X people to fix xorg ;)
Alexander: thank you, this will speed things along nicely :) I'll work on committing the changes tonight when I get home.
New patch in -r4. Thanks for your patience.
Will that patch also be applied to 6.8.99.15?
Yes. 6.8.99.15 contains some extra affected code that doesn't exist in 6.8.2 so I need to spend a few minutes this morning putting a different patch together.
*** Bug 106241 has been marked as a duplicate of this bug. ***
Thank you for your work.
Fixed where? After xorg 6.8.2-r4 I'm still getting BadAlloc... Do I need to re-emerge wine?
Sorry. I've emerged -r4 but I was running -r3 (didn't kill X) The bug is actually fixed.
emerging -r4 fixed everything for me... my sound works in wine now which it didn't before, but I highly suspect that's not related ;)
wfm too :) good work everyone.
*** Bug 106641 has been marked as a duplicate of this bug. ***