aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2024-11-04 07:46:55 +0000
committerBartosz Golaszewski <[email protected]>2024-11-04 07:46:55 +0000
commita7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88 (patch)
tree3d0296da382dd92ab964719d981fa32ee383e886 /fs/open.c
parentgpio: mpsse: Check for error code from devm_mutex_init() call (diff)
parentLinux 6.12-rc6 (diff)
downloadkernel-a7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88.tar.gz
kernel-a7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88.zip
Merge tag 'v6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
Linux 6.12-rc6
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index acaeb3e25c88..5da4df2f9b18 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1457,6 +1457,8 @@ SYSCALL_DEFINE4(openat2, int, dfd, const char __user *, filename,
if (unlikely(usize < OPEN_HOW_SIZE_VER0))
return -EINVAL;
+ if (unlikely(usize > PAGE_SIZE))
+ return -E2BIG;
err = copy_struct_from_user(&tmp, sizeof(tmp), how, usize);
if (err)