From: Oliver Neukum <oneukum@suse.com>
To: "Ren Mingshuai" <renmingshuai@huawei.com>,
kuba@kernel.org, "Bjørn Mork" <bjorn@mork.no>
Cc: caowangbao@huawei.com, davem@davemloft.net,
khlebnikov@openvz.org, liaichun@huawei.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
oneukum@suse.com, yanan@huawei.com
Subject: Re: [PATCH] net: usbnet: Fix potential NULL pointer dereference
Date: Mon, 6 Nov 2023 13:59:08 +0100 [thread overview]
Message-ID: <b377a7c1-bf41-4fd2-81b9-ace2b6134c4e@suse.com> (raw)
In-Reply-To: <20231102090630.938759-1-renmingshuai@huawei.com>
On 02.11.23 10:06, Ren Mingshuai wrote:
>> What do you mean? Grepping the function name shows call sites with NULL getting passed as skb.
You may see that we do check skb != NULL before we timestamp it.
But later in the process we depend skb == NULL implying that tx_fixup != NULL
That is the combination that must not happen. If it happens, though
simply bailing out seems to the wrong answer.
> Yes And I just learned that during the cdc_ncm_driver.probe, it is possible to pass a NULL SKB to usbnet_start_xmit().
How can that happen? And if it happens is tx_fixup set?
Regards
Oliver
prev parent reply other threads:[~2023-11-06 12:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 12:35 Ren Mingshuai
2023-11-01 12:55 ` Ren Mingshuai
2023-11-02 4:38 ` Jakub Kicinski
2023-11-02 9:06 ` Ren Mingshuai
2023-11-06 10:18 ` Oliver Neukum
2023-11-06 10:55 ` Bjørn Mork
2023-11-06 12:53 ` Oliver Neukum
2023-11-06 12:59 ` Oliver Neukum [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=b377a7c1-bf41-4fd2-81b9-ace2b6134c4e@suse.com \
--to=oneukum@suse.com \
--cc=bjorn@mork.no \
--cc=caowangbao@huawei.com \
--cc=davem@davemloft.net \
--cc=khlebnikov@openvz.org \
--cc=kuba@kernel.org \
--cc=liaichun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=renmingshuai@huawei.com \
--cc=yanan@huawei.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®