aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-09-30 12:32:34 +0000
committerMiquel Raynal <[email protected]>2025-10-22 09:53:59 +0000
commite4185bed738da755b191aa3f2e16e8b48450e1b8 (patch)
treee7ed39f0dea06784cd6cf9eaccdfb1f642feae73 /lib/mpi/mpi-mod.c
parentLinux 6.18-rc1 (diff)
downloadkernel-e4185bed738da755b191aa3f2e16e8b48450e1b8.tar.gz
kernel-e4185bed738da755b191aa3f2e16e8b48450e1b8.zip
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: [email protected] Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions