Gentoo Archives: gentoo-hardened

From: Alex Efros <powerman@××××××××.name>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] tcpserver use random amount of memory
Date: Wed, 20 Mar 2013 15:59:07
Message-Id: 20130320155901.GB7702@home.power
In Reply to: Re: [gentoo-hardened] tcpserver use random amount of memory by PaX Team
1 Hi!
2
3 On Wed, Mar 20, 2013 at 10:15:16AM +0100, PaX Team wrote:
4 > > > https://bugs.gentoo.org/show_bug.cgi?id=462430
5 >
6 > next time add me to the bug if you expect an answer instead of spamming
7 > every possible forum.
8
9 Ok.
10
11 > nevertheless to reduce the pain i've fixed the gap accounting in that these
12 > areas are not taken into account when mmap checks RLIMIT_AS, so it should
13 > be fine now (did you even search the gentoo bugzilla or the grsec forums for
14 > similar issues? i thought so). you'll need to update to 3.8.3 though because
15 > 3.7 is no longer supported.
16
17 I've searched gentoo bugzilla, but not grsec forums (when I report this
18 issue I wasn't sure it's related to hardened).
19
20 Anyway, I've tried 3.8.3, and see no difference at all on 32-bit system:
21
22 # uname -a
23 Linux web 3.8.3-hardened #1 SMP Wed Mar 20 15:45:48 GMT 2013 i686 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux
24 # softlimit -m 32000000 tcpserver 0.0.0.0 11111 echo ok
25 Killed
26 kern.alert: grsec: From 127.0.0.1: denied resource overstep by requesting 189251584 for RLIMIT_AS against limit 32000000 for /usr/bin/tcpserver[tcpserver:1821] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:1307] uid/euid:0/0 gid/egid:0/0
27
28 At same time, on 3.8.3 64-bit system tcpserver works ok under much lower
29 softlimit -m 5000000 (5MB!) without any grsec errors in log (`ps axu`
30 still show tcpserver uses up to 60MB VSZ).
31
32 --
33 WBR, Alex.

Replies

Subject Author
Re: [gentoo-hardened] tcpserver use random amount of memory PaX Team <pageexec@××××××××.hu>