]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
libata: if T_LENGTH is zero, dma direction should be DMA_NONE
authorGeorge Kennedy <george.kennedy@oracle.com>
Tue, 14 Dec 2021 14:45:10 +0000 (09:45 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 7 Mar 2022 15:34:14 +0000 (16:34 +0100)
commit5d92cd4c04f519f8f3b2002d39ae892082f638c8
tree499011b5b2f8612a9cfd3d42247947ce61b07cb1
parent8662654bad91988dd618d8be8e59a16f6f759a8d
libata: if T_LENGTH is zero, dma direction should be DMA_NONE

BugLink: https://bugs.launchpad.net/bugs/1957991
commit 5da5231bb47864e5dd6c6731151e98b6ee498827 upstream.

Avoid data corruption by rejecting pass-through commands where
T_LENGTH is zero (No data is transferred) and the dma direction
is not DMA_NONE.

Cc: <stable@vger.kernel.org>
Reported-by: syzkaller<syzkaller@googlegroups.com>
Signed-off-by: George Kennedy<george.kennedy@oracle.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
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/ata/libata-scsi.c