Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491516 - sys-kernel/hardened-sources-3.11.2: reiserfs xattr broken
Summary: sys-kernel/hardened-sources-3.11.2: reiserfs xattr broken
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 19:30 UTC by Alex Efros
Modified: 2014-11-29 19:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2013-11-17 19:30:09 UTC
After updating from sys-kernel/hardened-sources-3.10.1-r1 to 3.11.2 PaX flags in xattr doesn't work anymore on reiserfs. Any attempt to run pax-marked binary from raiserfs result in this message in kernel log:

    kern.warn: REISERFS warning (device sda2): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr (user.pax.flags) associated with [1919251317 2019651630 0xc007367616c662e DIRECT]

and then binary executed without taking pax flags in account (which usually mean it won't run).

Googling shows this already happens a couple of times several years ago, for ex.: https://bugzilla.kernel.org/show_bug.cgi?id=14826
Comment 1 Anthony Basile gentoo-dev 2013-11-17 21:04:51 UTC
I wonder if this is a vanilla issue.  Can you test 1) the very latest hardened sources which I pushed onto the three, 3.11.8 and 2) the same config file with vanilla sources.  See if you can reproduce the problem in either.  I unfortunately do not have any reiser systems and would have to build a vm.
Comment 2 Alex Efros 2013-11-17 23:25:40 UTC
hardened-sources-3.11.8 have this issue.
vanilla-sources-3.12.0 doesn't have this issue.
Comment 3 PaX Team 2013-11-18 01:10:22 UTC
how do you know that vanilla doesn't have the issue? did you port the whole user.pax.flags patch to it?
Comment 4 Alex Efros 2013-11-18 01:47:11 UTC
As far as I see this issue has nothing with PaX, any xattrs result in this kernel warning from reiserfs. I've tried to set/get "user.test" attr and get same warning in kernel log.
Comment 5 Alex Efros 2013-11-18 01:48:54 UTC
Actually, if I remember correctly, getfattr works ok and show pax flags (with warning in kernel log), but PaX didn't apply these flags when binaries run.
Comment 6 Alex Efros 2014-01-17 16:18:27 UTC
3.11.7-hardened-r1 has same issue.

I've just checked once again - `paxctl-ng -v` and `getfattr -d` correctly show pax flags in xattr, but these flags doesn't have any effect and there are reiserfs warning in log on every access to paxmarked file.
Comment 7 Alex Efros 2014-01-17 16:34:34 UTC
Wow. Everything is much more interesting! I've recompiled 3.10.1-r1 - just in case, for no reason. And it now doesn't work exactly in same way. Previous version of 3.10.1-r1 (auto-backuped by grub in /boot/vmlinuz-3.10.1-hardened-r1.old) works ok. /proc/config.gz in these two 3.10.1-r1 kernels are exactly same.

So, looks like this issue may be related to way how kernel was built - maybe something related to different gcc versions or optimizations.
Comment 8 Alex Efros 2014-01-17 18:06:29 UTC
This issue happens when kernel compiled using sys-devel/gcc-4.7.3-r1. When I use sys-devel/gcc-4.6.3 everything works fine.
Comment 9 Alex Efros 2014-03-22 22:13:31 UTC
This issue still exists in hardened-sources-3.13.2-r3.
Comment 10 Anthony Basile gentoo-dev 2014-09-14 00:06:59 UTC
(In reply to Alex Efros from comment #9)
> This issue still exists in hardened-sources-3.13.2-r3.

Still an issue?
Comment 11 Anthony Basile gentoo-dev 2014-11-29 13:55:30 UTC
(In reply to Alex Efros from comment #8)
> This issue happens when kernel compiled using sys-devel/gcc-4.7.3-r1. When I
> use sys-devel/gcc-4.6.3 everything works fine.

I find this hard to understand.  Anyhow, if this is still an issue for you, try gcc-4.8.3 with hardened-sources-3.17.4 and let's pick up from there.  If the issue is there when you compile the kernel with 4.8.3 and gone when you compile with 4.6.3, then we have a clean starting point.
Comment 12 Alex Efros 2014-11-29 17:59:33 UTC
I don't use reiserfs anymore.
Comment 13 Anthony Basile gentoo-dev 2014-11-29 19:27:03 UTC
(In reply to Alex Efros from comment #12)
> I don't use reiserfs anymore.

Reopen this bug if you get any more information about this bug.