Summary: | dev-libs/lzo-2.08: remove | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Guido Winkelmann <guido-genbugs> |
Component: | [OLD] Server | Assignee: | Michał Górny <mgorny> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dmm |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | Sparc | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 612872 | ||
Bug Blocks: | 371525 | ||
Attachments: | Patch for lzo-2.08 that fixes undefined behavior causing crashes on strictly aligned architectures. |
Description
Guido Winkelmann
2014-12-09 22:00:41 UTC
You wouldn't get a coredump because this is not a segmentation fault. A SIGBUS on SPARC could be caused by an unaligned memory access, which is probably what this will turn out to be. dmesg should tell you why the SIGBUS occurred. Please post your `emerge --info =net-misc/openvpn-2.3.6' output in a comment. > dmesg should tell you why the SIGBUS occurred. No, there is no dmesg output after the crash. > Please post your `emerge --info =net-misc/openvpn-2.3.6' output in a comment. # emerge --info =net-misc/openvpn-2.3.6 Portage 2.2.8-r2 (default/linux/sparc/13.0, gcc-4.7.3, glibc-2.19-r1, 3.5.7-gentoo sparc64) ================================================================= System Settings ================================================================= System uname: Linux-3.5.7-gentoo-sparc64-sun4u-with-gentoo-2.2 KiB Mem: 4153824 total, 1895768 free KiB Swap: 4194296 total, 4173016 free Timestamp of tree: Tue, 23 Dec 2014 01:00:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p53 dev-lang/perl: 5.18.2-r2 dev-lang/python: 2.7.7, 3.3.5-r1, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.12.6, 1.13.4 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.16 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo x-portage ACCEPT_KEYWORDS="sparc" ACCEPT_LICENSE="* -@EULA" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=ultrasparc -pipe" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mcpu=ultrasparc -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="" GENTOO_MIRRORS="ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ http://gentoo.tiscali.nl/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" USE="acl apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype curl curlwrappers cxx ddate dlz dri fortran gcc64 gd gdbm git iconv imap iproute2 ipv6 json kolab ldap lzma modules ncurses nls nptl openmp pam pcre perl postgres python readline sasl session sieve sparc ssl subversion svnserve tcpd unicode xml zip zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga r128 radeon sunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON ================================================================= Package Settings ================================================================= net-misc/openvpn-2.3.6 was built with the following: USE="iproute2 lzo pam plugins ssl -down-root -examples -passwordsave (-pkcs11) (-polarssl) (-selinux) -static -systemd" Upstream bug report: https://community.openvpn.net/openvpn/ticket/497#comment:3 It appears the bug is actually in LZO. Unfortunately, I have no idea how to produce a reduced test case for LZO that can reproduce the crash... Created attachment 395266 [details, diff]
Patch for lzo-2.08 that fixes undefined behavior causing crashes on strictly aligned architectures.
The problem is definitely in lzo. The library attempts an unaligned load halfword in lzo-2.08/src/lzo_init.c. The compiler emits the offending instruction because lzo provokes undefined behavior in the functions to load and store integers at arbitrary, potentially unsigned addresses.
In particular, lzo_memops_get_ne16, lzo_memops_get_ne32, lzo_memops_put_ne16, and lzo_memops_put_ne32 attempt to access an int through a pointer cast to a struct.
To test this conclusion I've implemented a fix that reimplements those functions with endian-neutral alternatives. These should work on any architecture. I've tested them on amd64 and sparc.
I've written the author of the library with my findings and I'll update when I hear from him.
The LZO author informed me that he's implemented a workaround that is included in the 2.09 release. With 2.09 "make test" now runs successfully. So this problem should be resolved once the LZO version is bumped. Which I've requested here: https://bugs.gentoo.org/show_bug.cgi?id=539760 dev-libs/lzo-2.09 is in tree now. Will keep open until 2.08 has been removed. Keywords for dev-libs/lzo: | | u | | a a p s a n r | n | | l m h i p p r m m i i s | e u s | r | p d a p a p c a x m i 6 o s 3 | a s l | e | h 6 r p 6 p 6 r 8 6 p 8 s c 9 s | p e o | p | a 4 m a 4 c 4 c 6 4 s k 2 v 0 h | i d t | o --------+---------------------------------+-------+------- 2.08 | + + + + + + + + + + ~ + o o + + | 5 o 2 | gentoo [I]2.09 | + + + + + + + + + + ~ ~ o o ~ ~ | 5 o | gentoo 2.10 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o o ~ ~ | 6 o | gentoo Mgorny, okay to remove it? Sure, kill it with fire ;-). Removed |