lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66341bb1-a479-cdc8-0928-3c882ac77712@gmail.com>
Date:   Wed, 5 Jan 2022 15:49:20 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     syzbot <syzbot+6ca9f7867b77c2d316ac@...kaller.appspotmail.com>,
        andrew@...n.ch, davem@...emloft.net, glider@...gle.com,
        kuba@...nel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, linux@...pel-privat.de,
        netdev@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] KMSAN: uninit-value in ax88178_reset

On 1/5/22 15:04, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    b0a8b5053e8b kmsan: core: add dependency on DEBUG_KERNEL
> git tree:       https://github.com/google/kmsan.git master
> console output: https://syzkaller.appspot.com/x/log.txt?x=159cf693b00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=46a956fc7a887c60
> dashboard link: https://syzkaller.appspot.com/bug?extid=6ca9f7867b77c2d316ac
> compiler:       clang version 14.0.0 (/usr/local/google/src/llvm-git-monorepo 2b554920f11c8b763cd9ed9003f4e19b919b8e1f), GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=14413193b00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=127716a3b00000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+6ca9f7867b77c2d316ac@...kaller.appspotmail.com
> 
> asix 1-1:0.0 eth1: Failed to read reg index 0x0000: -32
> asix 1-1:0.0 eth1: Failed to read reg index 0x0000: -32
> =====================================================
> BUG: KMSAN: uninit-value in ax88178_reset+0xfd2/0x1590 drivers/net/usb/asix_devices.c:946 drivers/net/usb/asix_devices.c:946
>   ax88178_reset+0xfd2/0x1590 drivers/net/usb/asix_devices.c:946 drivers/net/usb/asix_devices.c:946
>   usbnet_open+0x16d/0x1940 drivers/net/usb/usbnet.c:894 drivers/net/usb/usbnet.c:894
>   __dev_open+0x920/0xb90 net/core/dev.c:1490 net/core/dev.c:1490
>   __dev_change_flags+0x4da/0xd40 net/core/dev.c:8796 net/core/dev.c:8796
>   dev_change_flags+0xf5/0x280 net/core/dev.c:8867 net/core/dev.c:8867
>   devinet_ioctl+0xfc1/0x3060 net/ipv4/devinet.c:1144 net/ipv4/devinet.c:1144
>   inet_ioctl+0x59f/0x820 net/ipv4/af_inet.c:969 net/ipv4/af_inet.c:969
>   sock_do_ioctl net/socket.c:1118 [inline]
>   sock_do_ioctl net/socket.c:1118 [inline] net/socket.c:1235
>   sock_ioctl+0xa3f/0x13d0 net/socket.c:1235 net/socket.c:1235
>   vfs_ioctl fs/ioctl.c:51 [inline]
>   __do_sys_ioctl fs/ioctl.c:874 [inline]
>   vfs_ioctl fs/ioctl.c:51 [inline] fs/ioctl.c:860
>   __do_sys_ioctl fs/ioctl.c:874 [inline] fs/ioctl.c:860
>   __se_sys_ioctl+0x2df/0x4a0 fs/ioctl.c:860 fs/ioctl.c:860
>   __x64_sys_ioctl+0xd8/0x110 fs/ioctl.c:860 fs/ioctl.c:860
>   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
>   do_syscall_x64 arch/x86/entry/common.c:51 [inline] arch/x86/entry/common.c:82
>   do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82 arch/x86/entry/common.c:82
>   entry_SYSCALL_64_after_hwframe+0x44/0xae
> 
> Local variable status created at:
>   ax88178_reset+0x69/0x1590
>   usbnet_open+0x16d/0x1940 drivers/net/usb/usbnet.c:894 drivers/net/usb/usbnet.c:894

Again usbnet_read_cmd() returns 0.

It seems reasonable to mark asix_read_cmd() as __must_check, so let's do 
it and add missing error handling

#syz test: https://github.com/google/kmsan.git master



With regards,
Pavel Skripkin
View attachment "ph" of type "text/plain" (3151 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ