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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Aug 2020 11:57:54 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Dmitry Vyukov <dvyukov@...gle.com>
Cc:     syzbot <syzbot+a7e220df5a81d1ab400e@...kaller.appspotmail.com>,
        Andrey Konovalov <andreyknvl@...gle.com>, balbi@...nel.org,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Alexander Potapenko <glider@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        USB list <linux-usb@...r.kernel.org>,
        syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: KMSAN: kernel-infoleak in raw_ioctl

On Mon, Aug 10, 2020 at 11:15:38AM +0200, Greg KH wrote:
> On Mon, Aug 10, 2020 at 11:08:33AM +0200, Greg KH wrote:
> > On Mon, Aug 10, 2020 at 11:00:07AM +0200, Dmitry Vyukov wrote:
> > > On Mon, Aug 10, 2020 at 9:46 AM Greg KH <gregkh@...uxfoundation.org> wrote:
> > > >
> > > > On Sun, Aug 09, 2020 at 09:27:18AM -0700, syzbot wrote:
> > > > > Hello,
> > > > >
> > > > > syzbot found the following issue on:
> > > > >
> > > > > HEAD commit:    ce8056d1 wip: changed copy_from_user where instrumented
> > > > > git tree:       https://github.com/google/kmsan.git master
> > > > > console output: https://syzkaller.appspot.com/x/log.txt?x=141eb8b2900000
> > > > > kernel config:  https://syzkaller.appspot.com/x/.config?x=3afe005fb99591f
> > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=a7e220df5a81d1ab400e
> > > > > compiler:       clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
> > > > > userspace arch: i386
> > > > >
> > > > > Unfortunately, I don't have any reproducer for this issue yet.
> > > >
> > > > The irony of a kernel module written for syzbot testing, causing syzbot
> > > > reports....
> > > 
> > > The raw gadget and KCOV are also kernel code and subject to all the
> > > same rules as any other kernel code from syzkaller point of view.
> > > 
> > > But I think the root cause of this bug is the origin of the uninitialized-ness:
> > > 
> > > Local variable ----buf.i@...x_get_phy_addr created at:
> > >  asix_read_cmd drivers/net/usb/asix_common.c:312 [inline]
> > >  asix_read_phy_addr drivers/net/usb/asix_common.c:295 [inline]
> > >  asix_get_phy_addr+0x4d/0x290 drivers/net/usb/asix_common.c:314
> > >  asix_read_cmd drivers/net/usb/asix_common.c:312 [inline]
> > >  asix_read_phy_addr drivers/net/usb/asix_common.c:295 [inline]
> > >  asix_get_phy_addr+0x4d/0x290 drivers/net/usb/asix_common.c:314
> > 
> > read buffers sent to USB hardware are ment to be filled in by the
> > hardware with the data received from it, we do not zero-out those
> > buffers before passing the pointer there.
> > 
> > Perhaps with testing frameworks like the raw usb controller, that might
> > cause a number of false-positives to happen?
> 
> Ah, wait, that buffer is coming from the stack, which isn't allowed in
> the first place :(
> 
> So that should be changed anyway to a dynamic allocation, I'll go write
> up a patch...

Nope, my fault, the data is not coming from the stack, so all is good.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ