From: Pavel Skripkin <paskripkin@gmail.com>
To: syzbot <syzbot+c55162be492189fb4f51@syzkaller.appspotmail.com>,
Larry.Finger@lwfinger.net, agamkohli9@gmail.com,
florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] KASAN: use-after-free Read in rtl8712_dl_fw
Date: Tue, 19 Oct 2021 23:49:32 +0300 [thread overview]
Message-ID: <4617c408-b7f6-8861-4307-ed0ec24283ea@gmail.com> (raw)
In-Reply-To: <000000000000779cb105ceb65376@google.com>
[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]
On 10/19/21 18:29, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 8ef1e58783b9 usb: typec: STUSB160X should select REGMAP_I2C
> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> console output: https://syzkaller.appspot.com/x/log.txt?x=1106dcfb300000
> kernel config: https://syzkaller.appspot.com/x/.config?x=c27d285bdb7457e2
> dashboard link: https://syzkaller.appspot.com/bug?extid=c55162be492189fb4f51
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12725770b00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1168c158b00000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+c55162be492189fb4f51@syzkaller.appspotmail.com
>
Ok, this driver can't be fixed.... Let's try unregister netdev before
doing clean up stuff to not race with ->ndo_open()
#syz test:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
With regards,
Pavel Skripkin
[-- Attachment #2: ph --]
[-- Type: text/plain, Size: 847 bytes --]
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
index 505ebeb643dc..cae04272deff 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -595,12 +595,12 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
/* never exit with a firmware callback pending */
wait_for_completion(&padapter->rtl8712_fw_ready);
+ if (pnetdev->reg_state != NETREG_UNINITIALIZED)
+ unregister_netdev(pnetdev); /* will call netdev_close() */
usb_set_intfdata(pusb_intf, NULL);
release_firmware(padapter->fw);
if (drvpriv.drv_registered)
padapter->surprise_removed = true;
- if (pnetdev->reg_state != NETREG_UNINITIALIZED)
- unregister_netdev(pnetdev); /* will call netdev_close() */
r8712_flush_rwctrl_works(padapter);
r8712_flush_led_works(padapter);
udelay(1);
next prev parent reply other threads:[~2021-10-19 20:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 15:29 syzbot
2021-10-19 20:49 ` Pavel Skripkin [this message]
2021-10-19 21:09 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4617c408-b7f6-8861-4307-ed0ec24283ea@gmail.com \
--to=paskripkin@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=agamkohli9@gmail.com \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-usb@vger.kernel.org \
--cc=syzbot+c55162be492189fb4f51@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®