linux/net/handshake
Chuck Lever 81246a6530 handshake: Require admin permission for DONE command
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.

Fixes: 3b3009ea8a ("net/handshake: Create a NETLINK service for handling handshake requests")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260609141831.90694-1-cel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-12 15:45:44 -07:00
..
.kunitconfig net/handshake: Add Kunit tests for the handshake consumer API 2023-04-19 18:48:48 -07:00
alert.c net/handshake: Trace events for TLS Alert helpers 2023-07-28 14:07:59 -07:00
genl.c handshake: Require admin permission for DONE command 2026-06-12 15:45:44 -07:00
genl.h net/handshake: Pass negative errno through handshake_complete() 2026-05-28 13:35:31 +02:00
handshake-test.c net/handshake: Verify file-reference balance in submit paths 2026-05-28 13:35:31 +02:00
handshake.h net/handshake: Take a long-lived file reference at submit 2026-05-28 13:35:31 +02:00
Makefile net/handshake: Add API for sending TLS Closure alerts 2023-07-28 14:07:59 -07:00
netlink.c net/handshake: Drain pending requests at net namespace exit 2026-05-28 13:35:32 +02:00
request.c net/handshake: Drain pending requests at net namespace exit 2026-05-28 13:35:32 +02:00
tlshd.c net/handshake: Pass negative errno through handshake_complete() 2026-05-28 13:35:31 +02:00
trace.c net/handshake: Trace events for TLS Alert helpers 2023-07-28 14:07:59 -07:00