summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2025-02-14 02:39:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:01:36 +0100
commit6578717ebca91678131d2b1f4ba4258e60536e9f (patch)
treee51774d2b16a569814575074208cc171dd4e31dc /io_uring
parent6ccb3bbdad671e0845f78916c79d6948850a6a7e (diff)
downloadlinux-6578717ebca91678131d2b1f4ba4258e60536e9f.tar.gz
linux-6578717ebca91678131d2b1f4ba4258e60536e9f.tar.bz2
linux-6578717ebca91678131d2b1f4ba4258e60536e9f.zip
partitions: mac: fix handling of bogus partition table
commit 80e648042e512d5a767da251d44132553fe04ae0 upstream. Fix several issues in partition probing: - The bailout for a bad partoffset must use put_dev_sector(), since the preceding read_part_sector() succeeded. - If the partition table claims a silly sector size like 0xfff bytes (which results in partition table entries straddling sector boundaries), bail out instead of accessing out-of-bounds memory. - We must not assume that the partition table contains proper NUL termination - use strnlen() and strncmp() instead of strlen() and strcmp(). Cc: stable@vger.kernel.org Signed-off-by: Jann Horn <jannh@google.com> Link: https://lore.kernel.org/r/20250214-partition-mac-v1-1-c1c626dffbd5@google.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
0 files changed, 0 insertions, 0 deletions