diff options
author | Pavel Skripkin <paskripkin@gmail.com> | 2022-01-07 01:57:16 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-01-10 03:35:50 +0300 |
commit | d668769eb9c52b150753f1653f7f5a0aeb8239d2 (patch) | |
tree | d7187210c707f5b0b4d76aee6c9fa484629310bf /tools/bpf/bpftool/map.c | |
parent | 6f022c2ddbcefaee79502ce5386dfe351d457070 (diff) | |
download | linux-d668769eb9c52b150753f1653f7f5a0aeb8239d2.tar.xz |
net: mcs7830: handle usb read errors properly
Syzbot reported uninit value in mcs7830_bind(). The problem was in
missing validation check for bytes read via usbnet_read_cmd().
usbnet_read_cmd() internally calls usb_control_msg(), that returns
number of bytes read. Code should validate that requested number of bytes
was actually read.
So, this patch adds missing size validation check inside
mcs7830_get_reg() to prevent uninit value bugs
Reported-and-tested-by: syzbot+003c0a286b9af5412510@syzkaller.appspotmail.com
Fixes: 2a36d7083438 ("USB: driver for mcs7830 (aka DeLOCK) USB ethernet adapter")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220106225716.7425-1-paskripkin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/map.c')
0 files changed, 0 insertions, 0 deletions