diff options
author | arr <arr@FreeBSD.org> | 2002-03-20 16:03:42 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-03-20 16:03:42 +0000 |
commit | fc9167c193b824c884e14549e879fd91b194649f (patch) | |
tree | c03c716985325fecd5970a187442b58a772cb58b /sys/kern/vfs_extattr.c | |
parent | 10ea87ba4be269a72fa25a58c6ae05d19b4d4720 (diff) | |
download | FreeBSD-src-fc9167c193b824c884e14549e879fd91b194649f.zip FreeBSD-src-fc9167c193b824c884e14549e879fd91b194649f.tar.gz |
- Change a check of securelevel to securelevel_gt() call in order to help
against users within a jail attempting to load kernel modules.
- Add a check of securelevel_gt() to vfs_mount() in order to chop some
low hanging fruit for the repair of securelevel checking of linking and
unlinking files from within jails. There is more to be done here.
Reviewed by: rwatson
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 915e26a..8247f8d 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -307,6 +307,11 @@ vfs_mount(td, fstype, fspath, fsflags, fsdata) vput(vp); return error; } + error = securelevel_gt(td->td_ucred, 0); + if (error == 0) { + vput(vp); + return (EPERM); + } error = linker_load_file(fstype, &lf); if (error || lf == NULL) { vput(vp); |