]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU
authorSagi Grimberg <sagi@grimberg.me>
Mon, 15 Mar 2021 21:08:11 +0000 (14:08 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 23 Apr 2021 09:51:00 +0000 (11:51 +0200)
commitad3890cbae3bd5e2db3b5952c5fd5bccfcd277c1
treee37001c12bfbb104766219aa8c3608dad36ae4ab
parentbf456bc0a1ad665f2246abb7967bc4bb5158da07
nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU

BugLink: https://bugs.launchpad.net/bugs/1923214
commit fd0823f405090f9f410fc3e3ff7efb52e7b486fa upstream.

When the controller sends us a 0-length r2t PDU we should not attempt to
try to set up a h2cdata PDU but rather conclude that this is a buggy
controller (forward progress is not possible) and simply fail it
immediately.

Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
Reported-by: Belanger, Martin <Martin.Belanger@dell.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/nvme/host/tcp.c