From: Jeff Xu <jeffxu@chromium.org>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-hardening@vger.kernel.org,
Jorge Lucangeli Obes <jorgelo@chromium.org>
Subject: mprotect outbound check.
Date: Mon, 15 May 2023 11:00:27 -0700 [thread overview]
Message-ID: <CABi2SkXjN+5iFoBhxk71t3cmunTk-s=rB4T7qo0UQRh17s49PQ@mail.gmail.com> (raw)
Noticed there is a slight change for mprotect between 6.1 and 6.4 RC1
For example:
Consider the case below:
1 mmap(0x5000000, PAGE_SIZE, ...)
2 mprotect(0x5000000, PAGE_SIZE*4, ...)
in 6.1 and before, 2 will fail, and in 6.4 RC1, it will pass.
I know that munmap will accept out-of-bound cases like this (because
memory is freed anyway).
Is this change intentional ?
Thanks!
Best regards,
-Jeff
next reply other threads:[~2023-05-15 18:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 18:00 Jeff Xu [this message]
2023-05-16 1:41 ` Jeff Xu
2023-05-16 16:34 ` Peter Xu
2023-05-16 16:57 ` Liam R. Howlett
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='CABi2SkXjN+5iFoBhxk71t3cmunTk-s=rB4T7qo0UQRh17s49PQ@mail.gmail.com' \
--to=jeffxu@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=jorgelo@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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