]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback
authorQiujun Huang <hqjagain@gmail.com>
Wed, 25 Mar 2020 07:52:37 +0000 (15:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:15 +0000 (11:02 +0200)
commit2280d01fc296167c472f51bc8d7f6e7c1f8cf193
tree5d44de0aa1bc7b9551837c1edb4609efe11e3d2e
parentf1b68bce0fae18c4bde9b7f09eaebfa5a2cd5f52
USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback

commit fc4aecf97246bb7cfdffdcbd8a2519ab46412212 upstream.

Fix slab-out-of-bounds read in the interrupt-URB completion handler.

The boundary condition should be (length - 1) as we access
data[position + 1].

Reported-and-tested-by: syzbot+37ba33391ad5f3935bbd@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_edgeport.c