gradm -C throws segmentation fault

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

gradm -C throws segmentation fault

Postby Marcin » Wed Jul 20, 2011 6:34 am

Hello!
I've generated policy using "full lears" system. I've done cat learnpolicy >>/etc/grsec/policy . When i wanted to check them with gradm -C i've got segfault:
# gradm -C
Segmentation fault

in dmesg appears:
[78991.970784] gradm[15562]: segfault at 3000000397 ip 00000305682e5c44 sp 0000039aa89cf0d0 error 4 in libc-2.12.2.so[305682a0000+162000]
[78991.970784] grsec: From 62.121.xxx.xxx: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /sbin/gradm[gradm:15562] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:47435] uid/euid:0/0 gid/egid:0/0


I've got installed gradm-2.2.2.201106072007 , kernel 2.6.39-hardened-r7 (ased on 2.6.39.3 + genpatches-2.6.39-5 + grsecurity-2.2.2-2.6.39.3-201107161559).
Is it something what i'm able to fix (in configuration) or is it something for upstream?
Regards.
Last edited by Marcin on Thu Jul 21, 2011 11:31 am, edited 1 time in total.
Marcin
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am

Re: gradm -C throws segmentation fault

Postby spender » Thu Jul 21, 2011 7:51 am

Could you send me the policy file so I can reproduce the crash? BTW appending to /etc/grsec/policy won't do what you want if you generated a full learning policy, since you'd be appending a full policy to an existing complete policy. It won't load.

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

Re: gradm -C throws segmentation fault

Postby Marcin » Thu Jul 21, 2011 9:18 am

I've sended policy via email. I'm expecting troubles when i append policies and i wanted check what should i fix:) And honestly, i'm absolute beginner with writing rules for grsec, this is start point to start learning.
Marcin
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am

Re: gradm -C throws segmentation fault

Postby spender » Thu Jul 21, 2011 6:18 pm

Hi Marcin,

The error has been fixed in the version of gradm in CVS (I've also just uploaded a new gradm tarball). If you want to fix it in your own copy, in gradm.y, find the line with "Duplicate variable" and change the $1 on that line to $2. The error it should have printed out regarded the duplicate variable present in your policy (from appending the full learning log).

Thanks for your report,
-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Re: gradm -C throws segmentation fault

Postby Marcin » Fri Jul 22, 2011 6:07 am

Thanks for fix!
Marcin
 
Posts: 3
Joined: Wed Jul 20, 2011 6:11 am


Return to grsecurity support