Re: [PATCH 1/9] handshake: Require admin permission for DONE command
Hannes Reinecke <[email protected]> Tue, 9 Jun 2026 08:33:51 +0200
| Newsgroups | dev.linux.lists.kernel-tls-handshake,org.infradead.lists.linux-nvme,org.kernel.vger.linux-nfs,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 6/5/26 19:34, Chuck Lever wrote: > From: Chuck Lever <[email protected]> > > ACCEPT and DONE are the two downcalls of the handshake genl > family, both intended for use by the trusted handshake agent > (tlshd). ACCEPT already requires GENL_ADMIN_PERM; DONE has > no privilege check at all. > > The fd-lookup in handshake_nl_done_doit() only confirms that > some pending handshake request exists for the supplied sockfd; > it does not authenticate the sender. An unprivileged process > that guesses or observes a valid sockfd can therefore submit > a DONE with HANDSHAKE_A_DONE_STATUS == 0, leaving the kernel > consumer to proceed as if the handshake succeeded. A non-zero > status on a forged DONE tears down a legitimate in-flight > handshake before tlshd can report its real result. > > A subsequent patch teaches the DONE handler to carry session > tags consumed for access control. That work makes closing the > existing gap a prerequisite, but the gap itself predates tags. > > Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") > Signed-off-by: Chuck Lever <[email protected]> > --- > Documentation/netlink/specs/handshake.yaml | 1 + > net/handshake/genl.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke <[email protected]> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich