Skip to content
Snippets Groups Projects
Commit c960b172 authored by Roberto Sassu's avatar Roberto Sassu Committed by Frieder Schrempf
Browse files

memfd: check for non-NULL file_seals in memfd_create() syscall

[ Upstream commit 935d44ac ]

Ensure that file_seals is non-NULL before using it in the memfd_create()
syscall.  One situation in which memfd_file_seals_ptr() could return a
NULL pointer when CONFIG_SHMEM=n, oopsing the kernel.

Link: https://lkml.kernel.org/r/20230607132427.2867435-1-roberto.sassu@huaweicloud.com


Fixes: 47b9012e ("shmem: add sealing support to hugetlb-backed memfd")
Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Cc: Marc-Andr Lureau <marcandre.lureau@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4f706e17
No related branches found
No related tags found
1 merge request!96🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.45)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment