Netdev List
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: amitkarwar@gmail.com, siva8118@gmail.com
Cc: syzkaller-bugs@googlegroups.com, kvalo@codeaurora.org,
	davem@davemloft.net, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: syzbot report in rsi_91x_usb.c
Date: Tue, 10 Sep 2019 21:11:16 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1909102049130.2551@hadrien> (raw)

Hello,

I spent some time looking at:

https://syzkaller.appspot.com/bug?id=c1b6aa968706d9380dcdb98a9f2c338071cc938c

which does not yet report that it has been fixed.

The problem seems to be in rsi_probe in
drivers/net/wireless/rsi/rsi_91x_usb.c.  This ends with the following
code:

        status = rsi_rx_urb_submit(adapter, WLAN_EP);
        if (status)
                goto err1;

        if (adapter->priv->coex_mode > 1) {
                status = rsi_rx_urb_submit(adapter, BT_EP);
                if (status)
                        goto err1;
        }

        return 0;
err1:
        rsi_deinit_usb_interface(adapter);
err:
        rsi_91x_deinit(adapter);


The problem seems to be that the first call to rsi_rx_urb_submit succeeds,
submitting an urb, and then theh second one fails.  Both share adapter,
which is used in rsi_rx_done_handler, invoked later as the callback
provided with usb_submit_urb.  But adapter, and in particular its rsi_dev
field, are freed by the rsi_91x_deinit call due to the failure of the
second call to rsi_rx_urb_submit.

How should this be fixed?

thanks,
julia

                 reply	other threads:[~2019-09-10 19:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.DEB.2.21.1909102049130.2551@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=amitkarwar@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=siva8118@gmail.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