diff options
author | Bjørn Mork <bjorn@mork.no> | 2019-09-18 14:01:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-05 13:13:14 +0200 |
commit | 98f1a3a21500ad4fd8e9a24e0c7d8cfaf4ae56f2 (patch) | |
tree | cd01cedb8ae090024f05e8270c89e3737143b32b /tools/testing | |
parent | 890984f31888c8251235b86c439b8d4b9f6af004 (diff) | |
download | linux-stable-98f1a3a21500ad4fd8e9a24e0c7d8cfaf4ae56f2.tar.gz linux-stable-98f1a3a21500ad4fd8e9a24e0c7d8cfaf4ae56f2.tar.bz2 linux-stable-98f1a3a21500ad4fd8e9a24e0c7d8cfaf4ae56f2.zip |
cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
[ Upstream commit 3fe4b3351301660653a2bc73f2226da0ebd2b95e ]
Endpoints with zero wMaxPacketSize are not usable for transferring
data. Ignore such endpoints when looking for valid in, out and
status pipes, to make the driver more robust against invalid and
meaningless descriptors.
The wMaxPacketSize of the out pipe is used as divisor. So this change
fixes a divide-by-zero bug.
Reported-by: syzbot+ce366e2b8296e25d84f5@syzkaller.appspotmail.com
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions