mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
kern: fix oversight in security.bsd.unprivileged_kenv_read
It was intended that one could close the hole back in loader, but the sysctl was actually not marked TUNABLE. The hardening menu option thus did nothing, because we wouldn't read the value from kenv. Reported by: markj Fixes:6e81fbf583("bsdinstall: add a hardening knob [...]") Fixes:4fd518fcb2("kern: add a security knob to disable [...]")
This commit is contained in:
1 parent
fd79bf6344
commit
8befc9e8b1
1 file changed
+1
-1
@@ -93,7 +93,7 @@ bool dynamic_kenv;
|
||||
panic("%s: called before SI_SUB_KMEM", __func__)
|
||||
|
||||
static int unprivileged_kenv_read = 1;
|
||||
SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_kenv_read, CTLFLAG_RW,
|
||||
SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_kenv_read, CTLFLAG_RWTUN,
|
||||
&unprivileged_kenv_read, 1,
|
||||
"Unprivileged processes can read the kernel environment");
|
||||
|
||||
|
||||
Reference in new issue
Block a user