Limit maxprocperuid to 9/10 maxproc, and limit maxfilesperproc to 9/10
maxfiles. This should make local resource exhaustion attacks easier to handle with a non-tweaked setup. MFC after: 3 days
This commit is contained in:
parent
7118b0c4c3
commit
ebacce5e99
@ -150,8 +150,8 @@ init_param2(int physpages)
|
||||
TUNABLE_INT_FETCH("kern.maxproc", &maxproc);
|
||||
maxfiles = MAXFILES;
|
||||
TUNABLE_INT_FETCH("kern.maxfiles", &maxfiles);
|
||||
maxprocperuid = maxproc - 1;
|
||||
maxfilesperproc = maxfiles;
|
||||
maxprocperuid = (maxproc * 9) / 10;
|
||||
maxfilesperproc = (maxfiles * 9) / 10;
|
||||
|
||||
/*
|
||||
* Cannot be changed after boot.
|
||||
|
Loading…
Reference in New Issue
Block a user