Skip to content

Commit 08d32a2

Browse files
committed
Merge: CVE-2024-41073: nvme: avoid double free special payload
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4917 JIRA: https://issues.redhat.com/browse/RHEL-51309 CVE: CVE-2024-41073 ``` 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> (cherry picked from commit e5d574a) ``` Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> Approved-by: Chris Leech <cleech@redhat.com> Approved-by: Maurizio Lombardi <mlombard@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents f73831a + 3cfd9c9 commit 08d32a2

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)