From: "Cen Zhang (Microsoft)" <cenzhang@linux.microsoft.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>,
"Liam R. Howlett" <liam@infradead.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, AutonomousCodeSecurity@microsoft.com,
tgopinath@linux.microsoft.com,
Cen Zhang <cenzhang@linux.microsoft.com>
Subject: [PATCH net 0/2] connector/cn_proc: fix listener count and socket state cleanup
Date: Mon, 2 Nov 2026 08:09:20 -0500 [thread overview]
Message-ID: <20261102130922.75629-1-cenzhang@linux.microsoft.com> (raw)
Two independent bugs in the process events connector, both reachable
by an unprivileged user:
1. proc_event_num_listeners can go negative because cn_proc_mcast_ctl()
does not validate mcast_op before storing it as socket state. All
process events are then suppressed for every subscriber.
2. sk_user_data leaks and the listener count stays too high because
cn_release() frees the state only for multicast group members and
never drops the count.
Both were found and fixed with the assistance of an LLM-based code
analysis tool and verified by the author.
Cen Zhang (Microsoft) (2):
connector/cn_proc: reject invalid mcast_op before touching socket
state
connector/cn_proc: release socket state and listener count on close
drivers/connector/cn_proc.c | 23 ++++++++++++++++++++---
drivers/connector/connector.c | 7 +++----
include/linux/cn_proc.h | 6 ++++++
3 files changed, 29 insertions(+), 7 deletions(-)
base-commit: 94cea342e8915812b45f93c56e134041c7fdb4d7
--
2.55.0
next reply other threads:[~2026-11-02 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 13:09 Cen Zhang (Microsoft) [this message]
2026-11-02 13:09 ` [PATCH net 1/2] connector/cn_proc: reject invalid mcast_op before touching socket state Cen Zhang (Microsoft)
2026-11-02 13:09 ` [PATCH net 2/2] connector/cn_proc: release socket state and listener count on close Cen Zhang (Microsoft)
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=20261102130922.75629-1-cenzhang@linux.microsoft.com \
--to=cenzhang@linux.microsoft.com \
--cc=AutonomousCodeSecurity@microsoft.com \
--cc=andrew+netdev@lunn.ch \
--cc=anjali.k.kulkarni@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tgopinath@linux.microsoft.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