Skip to content

Commit 41c58a3

Browse files
lorelei-sakaiMike Snitzer
authored andcommitted
dm vdo indexer: fix use after free
Fixes: b46d79b ("dm vdo: add deduplication index storage interface") Reported-by: Harshit Mogalapalli <[email protected]> Signed-off-by: Matthew Sakai <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 7979d90 commit 41c58a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/md/dm-vdo/indexer/index-layout.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,10 +1561,11 @@ static int __must_check load_index_save(struct index_save_layout *isl,
15611561

15621562

15631563
if (table->header.type != RH_TYPE_SAVE) {
1564+
uds_log_error_strerror(UDS_CORRUPT_DATA,
1565+
"unexpected index save %u header type %u",
1566+
instance, table->header.type);
15641567
vdo_free(table);
1565-
return uds_log_error_strerror(UDS_CORRUPT_DATA,
1566-
"unexpected index save %u header type %u",
1567-
instance, table->header.type);
1568+
return UDS_CORRUPT_DATA;
15681569
}
15691570

15701571
result = read_index_save_data(reader, isl, table->header.payload);

0 commit comments

Comments
 (0)