Loading
nvmet: always initialize cqe.result
mainline inclusion from mainline-v6.10-rc4 commit cd0c1b8e045a8d2785342b385cb2684d9b48e426 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGEMT CVE: CVE-2024-41079 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd0c1b8e045a8d2785342b385cb2684d9b48e426 -------------------------------- The spec doesn't mandate that the first two double words (aka results) for the command queue entry need to be set to 0 when they are not used (not specified). Though, the target implemention returns 0 for TCP and FC but not for RDMA. Let's make RDMA behave the same and thus explicitly initializing the result field. This prevents leaking any data from the stack. Signed-off-by:Daniel Wagner <dwagner@suse.de> Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Keith Busch <kbusch@kernel.org> Conflicts: drivers/nvme/target/fabrics-cmd-auth.c [removed file] Signed-off-by:
Yuntao Liu <liuyuntao12@huawei.com>