summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-09-30 15:32:34 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2025-10-22 11:53:59 +0200
commite4185bed738da755b191aa3f2e16e8b48450e1b8 (patch)
treee7ed39f0dea06784cd6cf9eaccdfb1f642feae73 /net/unix/af_unix.c
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
mtdchar: fix integer overflow in read/write ioctls
The "req.start" and "req.len" variables are u64 values that come from the user at the start of the function. We mask away the high 32 bits of "req.len" so that's capped at U32_MAX but the "req.start" variable can go up to U64_MAX which means that the addition can still integer overflow. Use check_add_overflow() to fix this bug. Fixes: 095bb6e44eb1 ("mtdchar: add MEMREAD ioctl") Fixes: 6420ac0af95d ("mtdchar: prevent unbounded allocation in MEMWRITE ioctl") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions