Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64880 - (grsec) gradm has improperly nested loops. I'm providing a patch.
Summary: (grsec) gradm has improperly nested loops. I'm providing a patch.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Hardened Gentoo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-21 12:00 UTC by Barry Schwartz
Modified: 2004-11-29 22:33 UTC (History)
0 users

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


Attachments
Fixes nested loops problem. (gradm_learn-nested-loops.patch,1.28 KB, patch)
2004-09-21 12:01 UTC, Barry Schwartz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Schwartz 2004-09-21 12:00:07 UTC
When running "gradm -L /path/to/learningmode/logfile -O /path/to/new/policy" a broken section of code can cause bad things, including eating up all virtual memory.  I have a fix, which I've also provided to gradm/grsecurity's author.

Reproducible: Always
Steps to Reproduce:
1.Given a log file that triggers the bug
2.Run "gradm -L logfile -O policyfile"
3.

Actual Results:  
Failure to finish, no output, potentially even exhaustion of memory and 
thrashing.

Expected Results:  
Finished and written output.

A patch is attached.
Comment 1 Barry Schwartz 2004-09-21 12:01:36 UTC
Created attachment 40118 [details, diff]
Fixes nested loops problem.
Comment 2 Adam Mondl (RETIRED) gentoo-dev 2004-09-22 14:46:16 UTC
2004-09-20 21:44  spender
	* gradm_learn.c: fix index, thanks to barry schwartz

Fixed in Grsecurity CVS.
Comment 3 solar (RETIRED) gentoo-dev 2004-09-28 19:03:06 UTC
Still need anything here?
Comment 4 solar (RETIRED) gentoo-dev 2004-11-29 22:33:35 UTC
2.0.2 is in the tree as ~arch now. This should resolve this bug as your patch went into upstream cvs beforehand.