Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvmet-tcp: Fix a possible UAF in queue intialization setup
jira VULN-6747 cve CVE-2023-5178 commit-author Sagi Grimberg <[email protected]> commit d920abd From Alon: "Due to a logical bug in the NVMe-oF/TCP subsystem in the Linux kernel, a malicious user can cause a UAF and a double free, which may lead to RCE (may also lead to an LPE in case the attacker already has local privileges)." Hence, when a queue initialization fails after the ahash requests are allocated, it is guaranteed that the queue removal async work will be called, hence leave the deallocation to the queue removal. Also, be extra careful not to continue processing the socket, so set queue rcv_state to NVMET_TCP_RECV_ERR upon a socket error. Cc: [email protected] Reported-by: Alon Zahavi <[email protected]> Tested-by: Alon Zahavi <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Keith Busch <[email protected]> (cherry picked from commit d920abd) Signed-off-by: Greg Rose <[email protected]>
- Loading branch information