prctl kernel exploit

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

prctl kernel exploit

Postby giany » Wed Jul 12, 2006 4:15 pm

Hello,

Is grsec 2.6.14 affected by this : http://www.securityfocus.com/bid/18874 ?
giany
 
Posts: 3
Joined: Wed Jul 12, 2006 4:11 pm

Postby spender » Wed Jul 12, 2006 6:36 pm

Yes, however if you use the RBAC system you can mitigate the risk of public exploits that (ab)use stupidity of vixie cron to get a root shell.

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Postby ralphy » Wed Jul 12, 2006 10:26 pm

setting core_pattern was suggested as a temporary fix as well.
ralphy
 
Posts: 52
Joined: Wed Jan 11, 2006 12:51 pm

Postby giany » Thu Jul 13, 2006 2:38 am

Yep it seems the core file is created. Probably with a little tune you might get root.
giany
 
Posts: 3
Joined: Wed Jul 12, 2006 4:11 pm

Postby ralphy » Thu Jul 13, 2006 9:43 am

As long as the core gets created in a fashion where cron can get to the core dump, pretty sure it's exploitable. echo "/tmp/core" > /proc/sys/kernel/core_pattern is a cheap work around
ralphy
 
Posts: 52
Joined: Wed Jan 11, 2006 12:51 pm

Postby chainsaw » Thu Jul 13, 2006 10:58 am

or just :

echo > /proc/sys/kernel/core_pattern

seems to work for me
chainsaw
 
Posts: 2
Joined: Thu Jul 13, 2006 10:57 am

Postby chainsaw » Thu Jul 13, 2006 11:07 am

i have one 2.6.14.6-grsec machine, which now
seems to be protected after echo > core_pattern

but before that it was creating the suid shell, but when
i execute it as ordinary user i'm not getting privilege escalation.
maybe grsec after all does something?
i have similar machine without grsec and there running the suid binary gives me root instantly
chainsaw
 
Posts: 2
Joined: Thu Jul 13, 2006 10:57 am

Postby ralphy » Thu Jul 13, 2006 6:24 pm

Just sh dropping privleges. Some distros tend to do it by default now such as Fedora iirc, easily circumventible with the "-p" flag. /tmp/sh -p will leverage root, on one of our production boxes we set the filesystems up to nosuid and readonly as well as setting core_pattern (just in case :)) until we can install the patch.
ralphy
 
Posts: 52
Joined: Wed Jan 11, 2006 12:51 pm

Postby ralphy » Sat Jul 15, 2006 2:48 am

mount -o remount,nosuid /proc

nice workaround for the new kernel vulnerability, if indeed grsec 2.6 kernels are effected :) don't have a 2.6 grsec enabled kernel so i can't test unfortunately, just thought it'd be helpful to those effected, if at all.
ralphy
 
Posts: 52
Joined: Wed Jan 11, 2006 12:51 pm


Return to grsecurity support

cron