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] [day] [month] [year] [list]
Date:   Mon, 22 Jun 2020 16:34:52 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     tuomas.tynkkynen@....fi
Cc:     steve.glendinning@...well.net, UNGLinuxDriver@...rochip.com,
        kuba@...nel.org, netdev@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usbnet: smsc95xx: Fix use-after-free after removal

From: Tuomas Tynkkynen <tuomas.tynkkynen@....fi>
Date: Sun, 21 Jun 2020 13:43:26 +0300

> Syzbot reports an use-after-free in workqueue context:
> 
> BUG: KASAN: use-after-free in mutex_unlock+0x19/0x40 kernel/locking/mutex.c:737
>  mutex_unlock+0x19/0x40 kernel/locking/mutex.c:737
>  __smsc95xx_mdio_read drivers/net/usb/smsc95xx.c:217 [inline]
>  smsc95xx_mdio_read+0x583/0x870 drivers/net/usb/smsc95xx.c:278
>  check_carrier+0xd1/0x2e0 drivers/net/usb/smsc95xx.c:644
>  process_one_work+0x777/0xf90 kernel/workqueue.c:2274
>  worker_thread+0xa8f/0x1430 kernel/workqueue.c:2420
>  kthread+0x2df/0x300 kernel/kthread.c:255
> 
> It looks like that smsc95xx_unbind() is freeing the structures that are
> still in use by the concurrently running workqueue callback. Thus switch
> to using cancel_delayed_work_sync() to ensure the work callback really
> is no longer active.
> 
> Reported-by: syzbot+29dc7d4ae19b703ff947@...kaller.appspotmail.com
> Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@....fi>

Applied, thanks.

Powered by blists - more mailing lists