diff options
author | 2025-02-14 02:39:50 +0100 | |
---|---|---|
committer | 2025-02-14 08:38:28 -0700 | |
commit | 80e648042e512d5a767da251d44132553fe04ae0 (patch) | |
tree | 4516f9009fa27b77f790cb09c7a44dd6a955ab9e /scripts/gdb/linux/utils.py | |
parent | block: cleanup and fix batch completion adding conditions (diff) | |
download | wireguard-linux-80e648042e512d5a767da251d44132553fe04ae0.tar.xz wireguard-linux-80e648042e512d5a767da251d44132553fe04ae0.zip |
partitions: mac: fix handling of bogus partition table
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>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions