From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: bin.lan.cn@eng.windriver.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] mm: call the security_mmap_file() LSM hook in remap_file_pages()
Date: Thu, 12 Dec 2024 12:57:26 -0500 [thread overview]
Message-ID: <20241212064417-9def5aeee31ae590@stable.kernel.org> (raw)
In-Reply-To: <20241212032639.3020089-1-bin.lan.cn@eng.windriver.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: ea7e2d5e49c05e5db1922387b09ca74aa40f46e2
WARNING: Author mismatch between patch and upstream commit:
Backport author: bin.lan.cn@eng.windriver.com
Commit author: Shu Han <ebpqwerty472123@gmail.com>
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 49d3a4ad57c5)
6.1.y | Not found
Note: The patch differs from the upstream commit:
---
1: ea7e2d5e49c05 ! 1: 6fdcac73c2ec9 mm: call the security_mmap_file() LSM hook in remap_file_pages()
@@ Metadata
## Commit message ##
mm: call the security_mmap_file() LSM hook in remap_file_pages()
+ [ Upstream commit ea7e2d5e49c05e5db1922387b09ca74aa40f46e2 ]
+
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
@@ Commit message
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
[PM: subject line tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
+ [ Resolve merge conflict in mm/mmap.c. ]
+ Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
## mm/mmap.c ##
@@ mm/mmap.c: SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ mm/mmap.c: SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long
+ if (ret)
+ goto out_fput;
ret = do_mmap(vma->vm_file, start, size,
- prot, flags, 0, pgoff, &populate, NULL);
+ prot, flags, pgoff, &populate, NULL);
+out_fput:
fput(file);
out:
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
prev parent reply other threads:[~2024-12-12 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 3:26 [PATCH 6.1] mm: call the security_mmap_file() LSM hook in remap_file_pages() bin.lan.cn
2024-12-12 17:57 ` Sasha Levin [this message]
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=20241212064417-9def5aeee31ae590@stable.kernel.org \
--to=sashal@kernel.org \
--cc=bin.lan.cn@eng.windriver.com \
--cc=stable@vger.kernel.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