diff options
author | Ming Lei <[email protected]> | 2021-03-27 15:13:09 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-03-27 09:22:18 -0600 |
commit | e82fc7855749aa197740a60ef22c492c41ea5d5f (patch) | |
tree | 676ffbe3e79759503f9d360c6388483a14313086 /scripts/gdb/linux/tasks.py | |
parent | 7de55b7d6f09a2865279d3c41c0fbdbfdb87486a (diff) |
block: don't create too many partitions
Commit a33df75c6328 ("block: use an xarray for disk->part_tbl") drops the
check on max supported number of partitionsr, and allows partition with
bigger partition numbers to be added. However, ->bd_partno is defined as
u8, so partition index of xarray table may not match with ->bd_partno.
Then delete_partition() may delete one unmatched partition, and caused
use-after-free.
Reviewed-by: Bart Van Assche <[email protected]>
Reported-by: [email protected]
Fixes: a33df75c6328 ("block: use an xarray for disk->part_tbl")
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions