[PATCH RFC 02/38] 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
Tue Nov 3 06:47:29 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")
> 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/20261102-work-procfs-bugfixes-v1-0-59422ed3e465@kernel.org?part=2




More information about the kexec mailing list