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
block: switch all files cleared marked as GPLv2 to SPDX tags
2019-04-30 16:11:57 -06:00
acorn.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
aix.c
partitions/aix: append null character to print data from disk
2018-07-27 09:17:41 -06:00
aix.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
amiga.c
block/partition: fix signedness issue for Amiga partitions
2023-07-27 08:37:29 +02:00
amiga.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
atari.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
atari.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
check.c
treewide: Use array_size() in vzalloc()
2018-06-12 16:19:22 -07:00
check.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cmdline.c
docs: block: convert to ReST
2019-07-15 09:20:27 -03:00
cmdline.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
efi.c
block: switch all files cleared marked as GPLv2 or later to SPDX tags
2019-04-30 16:11:59 -06:00
efi.h
block: switch all files cleared marked as GPLv2 or later to SPDX tags
2019-04-30 16:11:59 -06:00
ibm.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ibm.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
karma.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
karma.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
Kconfig
docs: admin-guide: add a series of orphaned documents
2019-07-15 11:03:02 -03:00
ldm.c
block/partitions/ldm: Convert a kernel-doc header into a non-kernel-doc header
2019-05-31 15:12:34 -06:00
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
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
msdos.c
partitions/msdos: Unable to mount UFS 44bsd partitions
2018-01-10 09:12:16 -07:00
msdos.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
osf.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
osf.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
sgi.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
sgi.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
sun.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
sun.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
sysv68.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
sysv68.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00
ultrix.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ultrix.h
block: add SPDX tags to block layer files missing licensing information
2019-04-30 16:12:03 -06:00