From: Paolo Abeni <pabeni@redhat.com>
To: Xia Yan <yanxia@cmss.chinamobile.com>,
netdev@vger.kernel.org, loic.poulain@oss.qualcomm.com,
ryazanov.s.a@gmail.com
Cc: johannes@sipsolutions.net, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
yana06070@163.com
Subject: Re: [PATCH net] net: wwan: mhi_wwan_mbim: fix dangling links on registration failure
Date: Tue, 17 Nov 2026 13:18:37 +0100 [thread overview]
Message-ID: <f781b15a-a731-4698-8161-d384af5bb535@redhat.com> (raw)
In-Reply-To: <20261111113213.280066-1-yanxia@cmss.chinamobile.com>
On 11/11/26 12:32, Xia Yan wrote:
> mhi_mbim_newlink() adds the link to mbim->link_list before calling
> register_netdevice(). If registration fails, the caller frees the
> netdev without removing the link, leaving a dangling list entry that
> RCU readers such as mhi_mbim_rx() can access after free.
>
> Register the netdev before adding the link to the list so that failed
> registrations do not publish a link.
>
> Found while reviewing newlink error paths. A UML/KASAN test module
> using driver wrappers and a fake MHI context reproduced the use-after-free
> in the driver's RCU lookup. The fix passed the registration-failure and
> create/delete tests. Both UML builds passed with W=1.
>
> Fixes: aa730a9905b7 ("net: wwan: Add MHI MBIM network driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xia Yan <yanxia@cmss.chinamobile.com>
This is not 'net' nor stable material.
/P
next prev parent reply other threads:[~2026-11-17 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 11:32 Xia Yan
2026-11-17 12:18 ` Paolo Abeni [this message]
2026-11-17 12:30 ` patchwork-bot+netdevbpf
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=f781b15a-a731-4698-8161-d384af5bb535@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=ryazanov.s.a@gmail.com \
--cc=stable@vger.kernel.org \
--cc=yana06070@163.com \
--cc=yanxia@cmss.chinamobile.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®