Roberto Sassu 935d44acf6 memfd: check for non-NULL file_seals in memfd_create() syscall
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: 47b9012ecdc7 ("shmem: add sealing support to hugetlb-backed memfd")
Signed-off-by: Roberto 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: Andrew Morton <akpm@linux-foundation.org>
2023-06-19 13:19:31 -07:00
..
2023-05-06 10:33:38 -07:00
2023-01-18 17:12:57 -08:00
2023-04-30 13:00:38 -07:00
2023-04-12 17:36:23 -07:00
2023-04-18 16:29:42 -07:00
2022-10-03 14:02:43 -07:00
2022-09-26 19:46:09 -07:00
2023-04-12 17:36:23 -07:00
2023-04-08 13:45:37 -07:00
2023-04-05 20:03:01 -07:00
2023-01-18 17:12:57 -08:00
2022-12-11 18:12:10 -08:00