Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "yao.zhang1@amlogic.com" <yao.zhang1@amlogic.com>
To: gregkh <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>,
	 tuan.zhang <tuan.zhang@amlogic.com>,
	 jianxin.pan <jianxin.pan@amlogic.com>
Subject: Re: mm: call the security_mmap_file() LSM hook in remap_file_pages()
Date: Tue, 27 Oct 2026 14:44:41 +0800	[thread overview]
Message-ID: <2026102714443948547539@amlogic.com> (raw)
In-Reply-To: 2026102700-astonish-whenever-37b4@gregkh

Hi gregkh

I have verified the following:

1. The patch can be applied to the `linux-5.15.y` branch.
The commit applies cleanly on top of v5.15.223
(using `git cherry-pick -x`, with no conflicts):

git cherry-pick -x 0f910dbf2f2a4a7820ba4bac7b280f7108aa05b1
with no conflicts

git log --oneline
it can view the commit history.

2. Our customer is using the `5.15.y` branch
The customer has requested the inclusion of these CVEs.
and is unwilling to upgrade to version 6.x or higher.

Furthermore, as they are using GKI 2.0, they cannot apply "autopatch."
the only way to incorporate fixes for CVEs is by updating the LTS.


-------------------------------------
From: gregkh


Date: 2026-10-27 13:50



To: yao.zhang1@amlogic.com



CC: stable; tuan.zhang; jianxin.pan



Subject: Re: mm: call the security_mmap_file() LSM hook in remap_file_pages()



[ EXTERNAL EMAIL ]



 



On Tue, Oct 27, 2026 at 11:37:21AM +0800, yao.zhang1@amlogic.com wrote:



> Dear 5.15.y maintainers,



>



> An mm patch should be backported from upstream mainline to the stable



> 5.15.y branch. The patch's information is shown as below:



>



> [Subject]



> mm: call the security_mmap_file() LSM hook in remap_file_pages()



>



> [Upstream commit ID]



> 0f910dbf2f2a4a7820ba4bac7b280f7108aa05b1



>



> [Kernel version]



> 5.15.y



>



> [Why]



> The remap_file_pages syscall handler calls do_mmap() directly, which



> doesn't contain the LSM security check. And if the process has called



> personality(READ_IMPLIES_EXEC) before and remap_file_pages() is called for



> RW pages, this will actually result in remapping the pages to RWX,



> bypassing a W^X policy enforced by SELinux.



> So we should check prot by security_mmap_file LSM hook in the



> remap_file_pages syscall handler before do_mmap() is called. Otherwise, it



> potentially permits an attacker to bypass a W^X policy enforced by



> SELinux.



 



Please provide a working backport that you have tested for this, as it



does not apply cleanly on its own.



 



Also note that 5.15.y will only be alive for one more month, so why



aren't you moving off of this kernel version already instead of wanting



to add a new bugfix to it when there are already 2000+ unfixed CVEs in



that tree?



thanks,





greg k-h



  reply	other threads:[~2026-10-27  6:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2026102711371963416812@amlogic.com>
2026-10-27  5:50 ` mm: call the security_mmap_file() LSM hook in remap_file_pages() gregkh
2026-10-27  6:44   ` yao.zhang1 [this message]
2026-10-27  6:50     ` gregkh
2026-10-27  8:56       ` yao.zhang1
2026-10-27 19:10         ` Sasha Levin
2026-10-28  8:31           ` yao.zhang1
2026-10-27  6:00 ` yao.zhang1

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=2026102714443948547539@amlogic.com \
    --to=yao.zhang1@amlogic.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jianxin.pan@amlogic.com \
    --cc=stable@vger.kernel.org \
    --cc=tuan.zhang@amlogic.com \
    /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