From: "Theo de Raadt" <deraadt@openbsd.org>
To: Jeff Xu <jeffxu@chromium.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
akpm@linux-foundation.org, keescook@chromium.org, corbet@lwn.net,
jorgelo@chromium.org, groeck@chromium.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org, jannh@google.com, sroettger@google.com,
pedro.falcato@gmail.com, linux-hardening@vger.kernel.org,
willy@infradead.org, gregkh@linuxfoundation.org,
torvalds@linux-foundation.org, usama.anjum@collabora.com,
surenb@google.com, merimus@google.com,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
enh@google.com
Subject: Re: [PATCH v2 1/1] mseal: update mseal.rst
Date: Fri, 04 Oct 2024 13:11:42 -0600 [thread overview]
Message-ID: <51463.1728069102@cvs.openbsd.org> (raw)
In-Reply-To: <CABi2SkUhcEY7KxuRX3edOHJZbo2kZOZfa0sWrcG2_T0rnvHCWQ@mail.gmail.com>
Jeff Xu <jeffxu@chromium.org> wrote:
> > > + replacement with a new mapping with new set of attributes, or can
> > > + overwrite the existing mapping with another mapping.
> > > +
> > > + mprotect and pkey_mprotect are blocked because they changes the
> > > + protection bits (RWX) of the mapping.
> > > +
> > > + Some destructive madvise behaviors (MADV_DONTNEED, MADV_FREE,> + MADV_DONTNEED_LOCKED, MADV_FREE, MADV_DONTFORK, MADV_WIPEONFORK)
> > > + for anonymous memory, when users don't have write permission to the
> > > + memory. Those behaviors can alter region contents by discarding pages,
> >
> > above is not a sentence but I don't know how to fix it.
> >
> Would below work ?
>
> Certain destructive madvise behaviors, specifically MADV_DONTNEED,
> MADV_FREE, MADV_DONTNEED_LOCKED, MADV_FREE, MADV_DONTFORK,
> MADV_WIPEONFORK, can pose risks when applied to anonymous memory by
> threads without write permissions. These behaviors have the potential
> to modify region contents by discarding pages, effectively performing
> a memset(0) operation on the anonymous memory.
In OpenBSD, mimmutable blocks all those madvise() operations.
I don't understand the sentence supplied above. Is it saying that
mseal() solves that problem, or that mseal() does not solve that
problem.
I would hope it solves that problem. But the sentence explains the
problem without taking a position on what to do.
next prev parent reply other threads:[~2024-10-04 19:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 0:26 [PATCH v2 0/1] update mseal.rst jeffxu
2024-10-01 0:26 ` [PATCH v2 1/1] mseal: " jeffxu
2024-10-03 22:53 ` Randy Dunlap
2024-10-04 16:52 ` Jeff Xu
2024-10-04 19:11 ` Theo de Raadt [this message]
2024-10-07 15:00 ` Jeff Xu
2024-10-04 23:52 ` Randy Dunlap
2024-10-05 1:04 ` Theo de Raadt
2024-10-07 15:02 ` Jeff Xu
2024-10-07 15:01 ` Jeff Xu
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=51463.1728069102@cvs.openbsd.org \
--to=deraadt@openbsd.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=enh@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=jannh@google.com \
--cc=jeffxu@chromium.org \
--cc=jorgelo@chromium.org \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=merimus@google.com \
--cc=pedro.falcato@gmail.com \
--cc=rdunlap@infradead.org \
--cc=sroettger@google.com \
--cc=surenb@google.com \
--cc=torvalds@linux-foundation.org \
--cc=usama.anjum@collabora.com \
--cc=willy@infradead.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).