Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm vdo indexer: validate saved zone count

Verify that the loaded zone count is in the valid range
before using it as a loop iterator.

Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Matthew Sakai and committed by
Mikulas Patocka
9e809bb1 11439c46

+3
+3
drivers/md/dm-vdo/indexer/index-layout.c
··· 1445 1445 u64 last_block = next_block + isl->index_save.block_count; 1446 1446 1447 1447 isl->zone_count = table->header.region_count - 3; 1448 + if (isl->zone_count > MAX_ZONES) 1449 + return vdo_log_error_strerror(UDS_CORRUPT_DATA, 1450 + "invalid zone count"); 1448 1451 1449 1452 last_region = &table->regions[table->header.region_count - 1]; 1450 1453 if (last_region->kind == RL_KIND_EMPTY) {