Skip to content

Commit 3cfd9c9

Browse files
author
CKI Backport Bot
committed
nvme: avoid double free special payload
JIRA: https://issues.redhat.com/browse/RHEL-51309 CVE: CVE-2024-41073 commit e5d574a Author: Chunguang Xu <chunguang.xu@shopee.com> Date: Tue Jun 11 18:02:08 2024 +0800 nvme: avoid double free special payload If a discard request needs to be retried, and that retry may fail before a new special payload is added, a double free will result. Clear the RQF_SPECIAL_LOAD when the request is cleaned. Signed-off-by: Chunguang Xu <chunguang.xu@shopee.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent ffa09cd commit 3cfd9c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ void nvme_cleanup_cmd(struct request *req)
10091009
clear_bit_unlock(0, &ctrl->discard_page_busy);
10101010
else
10111011
kfree(bvec_virt(&req->special_vec));
1012+
req->rq_flags &= ~RQF_SPECIAL_PAYLOAD;
10121013
}
10131014
}
10141015
EXPORT_SYMBOL_GPL(nvme_cleanup_cmd);

0 commit comments

Comments
 (0)