From: Matthew Sakai <msakai@redhat.com>
To: dm-devel@lists.linux.dev
Cc: Matthew Sakai <msakai@redhat.com>
Subject: [PATCH] dm vdo indexer: fix use after free
Date: Fri, 1 Mar 2024 16:13:33 -0500 [thread overview]
Message-ID: <7d10a39b4762d75dba24912140f5879f6a5a22e4.1709327473.git.msakai@redhat.com> (raw)
Fixes: b46d79bdb82a ("dm vdo: add deduplication index storage interface")
Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
---
drivers/md/dm-vdo/indexer/index-layout.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-vdo/indexer/index-layout.c b/drivers/md/dm-vdo/indexer/index-layout.c
index 349b3022f1e1..74fd44c20e5c 100644
--- a/drivers/md/dm-vdo/indexer/index-layout.c
+++ b/drivers/md/dm-vdo/indexer/index-layout.c
@@ -1561,10 +1561,11 @@ static int __must_check load_index_save(struct index_save_layout *isl,
if (table->header.type != RH_TYPE_SAVE) {
+ uds_log_error_strerror(UDS_CORRUPT_DATA,
+ "unexpected index save %u header type %u",
+ instance, table->header.type);
vdo_free(table);
- return uds_log_error_strerror(UDS_CORRUPT_DATA,
- "unexpected index save %u header type %u",
- instance, table->header.type);
+ return UDS_CORRUPT_DATA;
}
result = read_index_save_data(reader, isl, table->header.payload);
--
2.42.0
reply other threads:[~2024-03-01 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d10a39b4762d75dba24912140f5879f6a5a22e4.1709327473.git.msakai@redhat.com \
--to=msakai@redhat.com \
--cc=dm-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).