mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
seccomp sandbox: restrict mremap flags
In the seccomp sandbox, restrict use of mremap(2) to only permit its use with the MREMAP_MAYMOVE flag and specifically not the MREMAP_FIXED flag, as the latter may have some use as part of an attack chain. Reported by: Mohammad Hossein Abedini <mhmd.abedinii@gmail.com> ok deraadt@
This commit is contained in:
1 file changed
+1
-1
@@ -367,7 +367,7 @@ static const struct sock_filter preauth_insns[] = {
|
||||
SC_ALLOW_ARG_MASK(__NR_mprotect, 2, PROT_READ|PROT_WRITE|PROT_NONE),
|
||||
#endif
|
||||
#ifdef __NR_mremap
|
||||
SC_ALLOW(__NR_mremap),
|
||||
SC_ALLOW_ARG_MASK(__NR_mremap, 3, MREMAP_MAYMOVE),
|
||||
#endif
|
||||
#ifdef __NR_munmap
|
||||
SC_ALLOW(__NR_munmap),
|
||||
|
||||
Reference in new issue
Block a user