Re: [PATCH] net: usbnet: Fix potential NULL pointer dereference

From: Oliver Neukum
Date: Mon Nov 06 2023 - 07:59:17 EST


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