kernel_samsung_a53x/drivers/nvme/target
Sagi Grimberg ea23de1dca nvmet-tcp: Fix a possible UAF in queue intialization setup
commit d920abd1e7c4884f9ecd0749d1921b7ab19ddfbd upstream.

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: stable@vger.kernel.org
Reported-by: Alon Zahavi <zahavi.alon@gmail.com>
Tested-by: Alon Zahavi <zahavi.alon@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:26:09 +01:00
..
admin-cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
discovery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fabrics-cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fcloop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io-cmd-bdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io-cmd-file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvmet.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
passthru.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp.c nvmet-tcp: Fix a possible UAF in queue intialization setup 2024-11-08 11:26:09 +01:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00