Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332355 - mem leak when using nfs on sys-kernel/hardened-sources-2.6.32-r9
Summary: mem leak when using nfs on sys-kernel/hardened-sources-2.6.32-r9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: High major
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 19:16 UTC by Matthew Thode ( prometheanfire )
Modified: 2010-10-02 22:33 UTC (History)
2 users (show)

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


Attachments
kernel config (2.6.32-r9,46.99 KB, text/plain)
2010-08-11 19:29 UTC, Matthew Thode ( prometheanfire )
Details
emerge --info (emerge --info,10.11 KB, text/plain)
2010-08-11 19:30 UTC, Matthew Thode ( prometheanfire )
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2010-08-11 19:16:22 UTC
There is a memory leak occurring when I use nfs on hardened sources 2.6.32-r9.  I've tested with -r11 and the problem is fixed so I did not investigate further.  I can give access to the system if needed (a test system)

Reproducible: Always

Steps to Reproduce:
1. Boot up with hardened sources 2.6.32-r9
2. Connect to NFS (I share portage with it)
3. Use NFS (I noticed the problem with an emerge)

Actual Results:  
kernel panic related to using too much memory

Expected Results:  
not crashed

I noticed that no swap was used.
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2010-08-11 19:29:20 UTC
Created attachment 242475 [details]
kernel config
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2010-08-11 19:30:34 UTC
Created attachment 242477 [details]
emerge --info
Comment 3 Anthony Basile gentoo-dev 2010-08-17 01:21:38 UTC
I was unable to reproduce this.  Comparing kernel config files, we have identical GRSEC, PaX and NFS settings.  Comparing emerge --info, we have identical profiles and toolchains.

My system was a full virt domU in a xen host.
Comment 4 Aleister 2010-08-17 18:18:46 UTC
i have the same issue but the problem also occurs even if i dont use nfs and there is all ready a bug about that #324243 so question is if you can reproduce it (like i did) with out using nfs (posting my details on that other bug).
Comment 5 Anthony Basile gentoo-dev 2010-08-17 18:32:40 UTC
I suspect that this is just another instance of bug #324243.

@Matthew Thode, can you tell us if you hit this in a virtualized guest?  If so what kind of virtualization?
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2010-08-17 18:35:27 UTC
the only reason I don't think it's the virt env is because I don't have the mem leak on anything but 2.6.32-r9

I am using kvm.
Comment 7 Anthony Basile gentoo-dev 2010-08-25 19:05:10 UTC
Okay I've got a better handle on this one.  To hit it you need to

1. be using hardened-sources-2.6.32-r9

2. be using virtio for your net and drive

   CONFIG_VIRT_TO_BUS=y
   CONFIG_VIRTIO_BLK=y
   CONFIG_VIRTIO_NET=y
   CONFIG_VIRTUALIZATION=y
   CONFIG_VIRTIO=y
   CONFIG_VIRTIO_RING=y
   CONFIG_VIRTIO_PCI=y
   CONFIG_VIRTIO_BALLOON=y

When I used virtio, but I switched to hs-2.6.32-r14 the memory leak went away.  I didn't test kernels between -r9 and -r14 but my suspicion is that -r9 is affected because it is the last with the grsec-2.1.14.  Later ones use grsec-2.2.0.

When I used any hardware emulation rather than virtio, the problem was not there for either -r9 or -r14.  So you need *both* for the problem to occur.

The workaround for now can be to avoid the above.  When we stabilize >= -r14 I'll close this bug.  Can others confirm this?

Comment 8 PaX Team 2010-10-02 10:26:05 UTC
can you guys try the latest .32 and .35 PaX test patches (http://www.grsecurity.net/~paxguy1/) and let me know if you still see the memory leak? if you do, can you post /proc/slabinfo in the hope that the leaking structure will show up there?
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2010-10-02 18:48:34 UTC
Bug is fixed from the grsec patchset 2.2.0 on.
Comment 10 Anthony Basile gentoo-dev 2010-10-02 22:33:36 UTC
(In reply to comment #9)
> Bug is fixed from the grsec patchset 2.2.0 on.
> 

I'm hoping to stabilize 2.6.32-r18 and 2.6.35-r1 after the necessary grace period.  Both are based on 2.2.0.  As I said above, I will close this bug then.