From: David Miller <davem@davemloft.net>
To: 92siuyang@gmail.com
Cc: isdn@linux-pingi.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isdn: hisax: isac: fix a possible concurrency use-after-free bug in ISAC_l1hw()
Date: Thu, 30 May 2019 12:38:33 -0700 (PDT) [thread overview]
Message-ID: <20190530.123833.494901093768074533.davem@davemloft.net> (raw)
In-Reply-To: <1559119739-27588-1-git-send-email-92siuyang@gmail.com>
From: Young Xiao <92siuyang@gmail.com>
Date: Wed, 29 May 2019 16:48:59 +0800
> In drivers/isdn/hisax/isac.c, the function isac_interrupt() and
> ISAC_l1hw() may be concurrently executed.
>
> ISAC_l1hw()
> line 499: if (!cs->tx_skb)
>
> isac_interrupt()
> line 250: dev_kfree_skb_irq(cs->tx_skb);
>
> Thus, a possible concurrency use-after-free bug may occur in ISAC_l1hw().
...
> + spin_lock_irqsave(&cs->lock, flags);
> if (!cs->tx_skb) {
> test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
> st->l1.l1l2(st, PH_PULL | CONFIRM, NULL);
> } else
> test_and_set_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
> + spin_unlock_irqrestore(&cs->lock, flags);
Nothing in this code accesses the cs->tx_skb object. It is just a logic test
upon whether it is NULL or not.
I'm not applying stuff like this, sorry.
You have to show how something can actually go wrong when fixing a bug.
prev parent reply other threads:[~2019-05-30 19:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 8:48 Young Xiao
2019-05-30 19:38 ` David Miller [this message]
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=20190530.123833.494901093768074533.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=92siuyang@gmail.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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®