[openssh-commits] [openssh] branch master updated: seccomp sandbox: restrict mremap flags

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Sep 3 14:19:11 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 769728b83 seccomp sandbox: restrict mremap flags
769728b83 is described below

commit 769728b835f19a2d5cb69062f21c8a30fbdca9a1
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Thu Sep 3 14:14:37 2026 +1000

    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 at gmail.com>
    
    ok deraadt@
---
 sandbox-seccomp-filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
index bf753eef2..fdbe76d21 100644
--- a/sandbox-seccomp-filter.c
+++ b/sandbox-seccomp-filter.c
@@ -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),

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list