[PATCH RESEND v2 16/51] PNP: isapnp: don't read past the end of the buffer on a large pread()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 5 11:29:20 PST 2026


> isapnp_proc_bus_read() truncates the position to an int. A pread() at
> an offset like 0xfffffc00 turns it negative, the check against the size
> of the configuration space passes, and the loop then puts everything
> from that position up to byte 256 into the reader's buffer, no matter
> how few bytes were asked for.
> 
> Keep the position as a loff_t and clamp the count against what is left
> of the configuration space.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reviewed-by: Rafael J. Wysocki (Intel) <rafael at kernel.org>
> Cc: stable at vger.kernel.org
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-work-procfs-bugfixes-v2-0-021c84d852e0@kernel.org?part=16




More information about the kexec mailing list