Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 505592

Summary: hardened-sources 3.13.2-hardened-r3 + zfs-kmod
Product: Gentoo Linux Reporter: RC <ramkumar.chinchani>
Component: HardenedAssignee: The Gentoo Linux Hardened Team <hardened>
Status: RESOLVED FIXED    
Severity: critical CC: 8573dd, ebox.4maillists, re.emese, ryao, spender
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Kernel config
kernel config

Description RC 2014-03-25 05:40:27 UTC
After the recent kernel upgrade from 3.11 to 3.13, sys-fs/zfs-kmod build barfs with the following in a continuous loop.

/var/tmp/portage/sys-fs/zfs-kmod-0.6.2-r3/work/zfs-zfs-0.6.2/module/zfs/../../module/zfs/vdev_disk.c: In function ‘bio_map’:
/var/tmp/portage/sys-fs/zfs-kmod-0.6.2-r3/work/zfs-zfs-0.6.2/module/zfs/../../module/zfs/vdev_disk.c:465:1: note: Function bio_map is missing from the size_overflow hash table +bio_map+3+15794+
/var/tmp/portage/sys-fs/zfs-kmod-0.6.2-r3/work/zfs-zfs-0.6.2/module/zfs/../../module/zfs/vdev_disk.c: In function ‘__vdev_disk_physio’:
/var/tmp/portage/sys-fs/zfs-kmod-0.6.2-r3/work/zfs-zfs-0.6.2/module/zfs/../../module/zfs/vdev_disk.c:465:1: note: Function bio_map is missing from the size_overflow hash table +bio_map+0+15794+
/var/tmp/portage/sys-fs/zfs-kmod-0.6.2-r3/work/zfs-zfs-0.6.2/module/zfs/../../module/zfs/vdev_disk.c:497:1: note: Function __vdev_disk_physio is missing from the size_overflow hash table +__vdev_disk_physio+4+55568+
Comment 1 RC 2014-03-25 05:41:10 UTC
#emerge --info

Portage 2.2.8-r1 (hardened/linux/amd64/no-multilib, gcc-4.7.3, glibc-2.17, 3.13.2-hardened-r3 x86_64)
=================================================================
System uname: Linux-3.13.2-hardened-r3-x86_64-AMD_FX-tm-8320_Eight-Core_Processor-with-gentoo-2.2
KiB Mem:    16340724 total,  14853372 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 25 Mar 2014 00:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)[m
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
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 xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j20"
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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 justify mmx modules ncurses nls nptl openmp pam pax_kernel pcre readline session sse sse2 ssl tcpd unicode urandom xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" GRUB_PLATFORMS="emu efi-32 efi-64 pc" 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 intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware 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, USE_PYTHON
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-03-28 21:07:42 UTC
please post your kernel config
Comment 3 Paul 2014-03-28 21:20:03 UTC
Created attachment 373774 [details]
Kernel config

I was able to get this to compile by adding 

bio_map15794 bio_map 0 15794 NULL
__vdev_disk_physio55568 __vdev_disk_physio 4 55568 NULL

to the size_overflow_hash.data table
Comment 4 RC 2014-03-29 06:42:12 UTC
Created attachment 373794 [details]
kernel config

Here is the kernel config.
Comment 5 RC 2014-03-29 06:43:53 UTC
(In reply to ebox.4maillists from comment #3)
> Created attachment 373774 [details]
> Kernel config
> 
> I was able to get this to compile by adding 
> 
> bio_map15794 bio_map 0 15794 NULL
> __vdev_disk_physio55568 __vdev_disk_physio 4 55568 NULL
> 
> to the size_overflow_hash.data table

Kindly look at bug 505594 because it is a related failure.
Comment 6 Paul 2014-03-29 16:33:06 UTC
(In reply to RC from comment #5)
> (In reply to ebox.4maillists from comment #3)
> > Created attachment 373774 [details]
> > Kernel config
> > 
> > I was able to get this to compile by adding 
> > 
> > bio_map15794 bio_map 0 15794 NULL
> > __vdev_disk_physio55568 __vdev_disk_physio 4 55568 NULL
> > 
> > to the size_overflow_hash.data table
> 
> Kindly look at bug 505594 because it is a related failure.

Do you have problems with the ZFS packages if you unset 

Security options->Grsecurity->Customize Configuration->PaX->Miscellaneous hardening features->Prevent various integer overflows in function size parameters 

or known as CONFIG_PAX_SIZE_OVERFLOW ?
Comment 7 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-03-29 17:44:10 UTC
spender, I think this bug and bug 505594 need to be added to that mapping table you told me about before.
Comment 8 PaX Team 2014-04-02 00:39:01 UTC
this was already fixed in PaX/grsec some time ago, please upgrade to something more recent.
Comment 9 RC 2014-04-02 01:51:12 UTC
(In reply to PaX Team from comment #8)
> this was already fixed in PaX/grsec some time ago, please upgrade to
> something more recent.

What components/packages should be upgraded?
Comment 10 Anthony Basile gentoo-dev 2014-09-14 00:36:21 UTC
(In reply to RC from comment #9)
> (In reply to PaX Team from comment #8)
> > this was already fixed in PaX/grsec some time ago, please upgrade to
> > something more recent.
> 
> What components/packages should be upgraded?

Upgrade to the latest hardened-sources.