From: Bugspray Bot <bugbot@kernel.org>
To: akpm@linux-foundation.org, bugs@lists.linux.dev, linux-mm@kvack.org
Subject: Re: MDWE does not prevent read-only, executable, shared memory regions to be updated by backing file writes
Date: Thu, 12 Sep 2024 21:10:11 +0000 [thread overview]
Message-ID: <20240912-b219227c2-cbc539461a3e@bugzilla.kernel.org> (raw)
In-Reply-To: <20240912-b219227c0-78bee9e213fc@bugzilla.kernel.org>
alip writes via Kernel.org Bugzilla:
Note, this is trivial to mitigate with a seccomp-bpf filter.
Sample code in Rust. Given "ctx" is a seccomp filter context:
// Prevent executable shared memory.
ctx.add_rule_conditional(
ScmpAction::KillProcess,
ScmpSyscall::new("mmap"), // same applies for mmap2.
&[scmp_cmp!($arg2 & PROT_EXEC == PROT_EXEC),
scmp_cmp!($arg3 & MAP_SHARED == MAP_SHARED)],
)?;
This is what syd[1] does since version 3.15.1
[1]: https://man.exherbolinux.org/syd.7.html#Advanced_Memory_Protection_Mechanisms
View: https://bugzilla.kernel.org/show_bug.cgi?id=219227#c2
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
next prev parent reply other threads:[~2024-09-12 21:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 21:10 MDWE does not prevent read-only, executable, shared memory regions to be updated by backing file writes Bugspray Bot
2024-09-12 21:10 ` Bugspray Bot
2024-09-12 21:10 ` Bugspray Bot [this message]
2024-09-12 21:10 ` Bugspray Bot
2024-09-12 21:10 ` Bugspray Bot
2025-07-17 13:15 ` Ali Polatel via Bugspray Bot
2025-07-18 15:00 ` Ali Polatel via Bugspray Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240912-b219227c2-cbc539461a3e@bugzilla.kernel.org \
--to=bugbot@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bugs@lists.linux.dev \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).