From: Jakub Kicinski <kuba@kernel.org>
To: Neill Kapron <nkapron@google.com>
Cc: netdev@vger.kernel.org, kernel-team@android.com,
cmllamas@google.com, jstultz@google.com,
Nick Hawkins <nick.hawkins@hpe.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Anastasia Kovaleva <a.kovaleva@yadro.com>,
Jinjie Ruan <ruanjinjie@huawei.com>,
Siddh Raman Pant <siddh.raman.pant@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC net] netlink: lock nl_cb_mutex in netlink_release
Date: Wed, 9 Jul 2025 16:47:04 -0700 [thread overview]
Message-ID: <20250709164704.4b0fcfff@kernel.org> (raw)
In-Reply-To: <20250708230513.42922-1-nkapron@google.com>
On Tue, 8 Jul 2025 23:04:52 +0000 Neill Kapron wrote:
> It is at this point after the netlink_dump() checks for cb_running that
> netlink_release() is called, which tears everything down. While the change
> in [2] clears cb_running, it does so without holding the lock. This causes
> the NULL pointer dereference in netlink_dump().
Closing a socket while it's being read is pretty unlikely for real
life processes. I don't think its even possible, but I'm not a VFS
expert.
AFAICT the crash is on:
if (dev->dev.parent &&
nla_put_string(skb, IFLA_PARENT_DEV_NAME,
dev_name(dev->dev.parent)))
goto nla_put_failure;
So my first suspicion would be dev.parent getting broken
under our feet for the "special" device you're dealing with..
prev parent reply other threads:[~2025-07-09 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 23:04 [RFC net] netlink: lock nl_cb_mutex in netlink_release Neill Kapron
2025-07-09 23:47 ` Jakub Kicinski [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=20250709164704.4b0fcfff@kernel.org \
--to=kuba@kernel.org \
--cc=0x7f454c46@gmail.com \
--cc=a.kovaleva@yadro.com \
--cc=cmllamas@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jstultz@google.com \
--cc=kernel-team@android.com \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick.hawkins@hpe.com \
--cc=nkapron@google.com \
--cc=pabeni@redhat.com \
--cc=ruanjinjie@huawei.com \
--cc=siddh.raman.pant@oracle.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.