Page MenuHomeFreeBSD

rpctls_impl.c: Fix handling of hung rpc tls daemon
ClosedPublic

Authored by rmacklem on Jun 28 2025, 8:38 PM.
Tags
None
Referenced Files
F133118721: D51083.diff
Thu, Oct 23, 3:20 AM
Unknown Object (File)
Sat, Oct 18, 3:57 PM
Unknown Object (File)
Tue, Oct 14, 1:20 PM
Unknown Object (File)
Tue, Oct 14, 1:20 PM
Unknown Object (File)
Tue, Oct 14, 1:20 PM
Unknown Object (File)
Mon, Oct 13, 11:30 PM
Unknown Object (File)
Sep 11 2025, 7:37 AM
Unknown Object (File)
Aug 31 2025, 12:55 PM
Subscribers

Details

Summary

Commit 26ee05939209 replaced soshutdown()
with soclose() for the case where the RPC TLS
daemon has not removed the socket from the RB
tree during an upcall.

It turns out that soshutdown() is needed for the
"else" case, which is the case that occurs when the
daemon is stuck in SSL_accept() or SSL_connect().

This patch adds a soshutdown() call to this else case,
which unsticks the daemon when the other end does
not do the actual TLS handshake. This can occur if
the daemon is not running at the other end.

Test Plan

Tested by doing NFS-over-TLS mount attempts with
no daemon running at the server end. It was also
tested by a trivial "fake" client that does the Null RPC
TLS probe, but then just sits there and doesn't do
a TLS handshake or close the TCP connection.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/rpc/rpcsec_tls/rpctls_impl.c
247

I've already added "or SSL_connect()" to this line in the comment.

This revision is now accepted and ready to land.Jul 9 2025, 5:12 PM