android_kernel_motorola_sm6375/block/partitions
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jann Horn a3e77da9f8 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>
2025-03-13 12:43:16 +01:00
..
acorn.c
acorn.h
aix.c
aix.h
amiga.c block/partition: fix signedness issue for Amiga partitions 2023-07-27 08:37:29 +02:00
amiga.h
atari.c
atari.h
check.c
check.h
cmdline.c
cmdline.h
efi.c
efi.h
ibm.c
ibm.h
karma.c
karma.h
Kconfig
ldm.c
ldm.h partitions: ldm: remove the initial kernel-doc notation 2025-03-13 12:42:52 +01:00
mac.c partitions: mac: fix handling of bogus partition table 2025-03-13 12:43:16 +01:00
mac.h
Makefile
msdos.c
msdos.h
osf.c
osf.h
sgi.c
sgi.h
sun.c
sun.h
sysv68.c
sysv68.h
ultrix.c
ultrix.h