[sudo-users] stack limit problem

Armin Kunaschik megabreit at googlemail.com
Tue Jun 7 10:33:11 MDT 2016


Hello!
Environment is AIX 7.1, sudo 1.8.16 (1.8.14 has the same problem)

The soft stack limit is set to -1 (unlimited), hard stack limit is set
to 8388608 (4GB)
I know that this is a weird combination... but I don't know whether
this was done on purpose
or on error.

ulimit -a displays the soft limits. The user has ALL=(ALL) NOPASSWD:
ALL and a soft stack limit of 32768 (16MB).
All other sudo defaults are not modified.

sudo -i seems to alter both the soft and hard stack limit as described
below, sudo su - doesn't.

$ su -
root's Password:
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         524288
stack(kbytes)        4194304 <---
memory(kbytes)       32768
coredump(blocks)     10240
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  unlimited
# ulimit -sH
4194304 <---
# exit
$ sudo su -
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         524288
stack(kbytes)        4194304 <---
memory(kbytes)       32768
coredump(blocks)     10240
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  unlimited
# ulimit -sH
4194304 <---
# exit
$ sudo -i
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         524288
stack(kbytes)        2097152 <--- !!!!!
memory(kbytes)       32768
coredump(blocks)     10240
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  unlimited
# ulimit -sH
2097152 <--- !!!!!

Is there any explanation for this behavior?
I checked things with a hard limit of unlimited: everything works as expected.

Regards,
Armin


More information about the sudo-users mailing list