Thread View: muc.lists.freebsd.bugs
3 messages
3 total messages
Started by bugzilla-noreply
Tue, 24 Nov 2026 13:53
[Bug 301082] rpc.tlsclntd: the SIGHUP certificate recheck tests the KTLS flag instead of the verify result, so CRL revocation ne...
Author: bugzilla-noreply
Date: Tue, 24 Nov 2026 13:53
Date: Tue, 24 Nov 2026 13:53
93 lines
5970 bytes
5970 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301082
Bug ID: 301082
Summary: rpc.tlsclntd: the SIGHUP certificate recheck tests the
KTLS flag instead of the verify result, so CRL
revocation never fires
Product: Base System
Version: 16.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: laamalif@proton.me
rpctls_connect() discards the server certificate needed for the
SIGHUP CRL check. The code was introduced by 2c76eebca71b
(2021-03-05) and remains unchanged on main, stable/15, releng/15.1
and releng/14.4. In usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c, the
connection's verification result is stored in verfret and checked
correctly at line 613 on releng/15.1:
if (verfret == X509_V_OK && (rpctls_verify_cafile != NULL ||
The certificate-retention check at line 659 instead uses ret:
if (ret == X509_V_OK && (rpctls_verify_cafile != NULL ||
rpctls_verify_capath != NULL) && rpctls_crlfile != NULL)
*certp = cert;
else
X509_free(cert);
At this point ret holds the BIO_get_ktls_recv() liveness flag, which
is 1 on a successful connection, rather than X509_V_OK. The check
therefore frees every server certificate and leaves cert == NULL in
each ssl_list entry. On SIGHUP, the rpctls_checkcrl() code shared by
both daemons in rpc.tlscommon.c finds no certificate to check. The
established connection remains usable until it ends normally. The
server daemon stores its peer certificate unconditionally at
rpc.tlsservd.c:459, so its SIGHUP check works. The faulty check is at
line 742 on releng/14.4.
I reproduced this with a FreeBSD 15.1-RELEASE-p7 amd64 NFS server
and a 15.1-RELEASE-p6 arm64 client. The server ran nfsd, mountd and
rpc.tlsservd -m -l -r; the client mounted with -o tls and ran
rpc.tlsclntd -d -v -m -l -r. The export used "/nfsroot -tls
-tlscert", and the server reported flags=0xb, confirming mutual
TLS.
As a control, I revoked the client certificate and sent SIGHUP to
rpc.tlsservd. It logged:
rpctls_daemon: Certificate Revoked issuerName=/CN=Test CA
subjectName=/CN=nfsclient2: TCP connection closed
The client mount then stopped serving reads. I next revoked the
server certificate, verified its serial in the CRL, and sent SIGHUP
to the stock rpc.tlsclntd. It logged nothing, did not close the
connection, and the mount continued to serve reads.
I rebuilt rpc.tlsclntd from staged releng/15.1 sources with only the
attached ret-to-verfret change. The build was warning-clean. On a
fresh mount, the same server-certificate test logged:
rpctls_daemon: Certificate Revoked issuerName=/CN=Test CA
subjectName=/CN=ip-10-27-9-20.eu-central-1.compute.internal:
TCP connection closed
The mount then stopped serving reads, matching the server-side
control. When the revoked certificate was already present in the
CRL at daemon startup, both stock and fixed clients rejected the
handshake through the unaffected SSL_get_verify_result() check.
setup-nfs.sh contains the setup commands and the test sequence.
I repeated the server-certificate SIGHUP test on 16.0-CURRENT. The
stock client logged nothing, and the mount continued to serve reads.
I rebuilt rpc.tlsclntd from /usr/src with only the attached
ret-to-verfret change using the source tree's build; compilation with
-Werror was clean. The fixed client logged the same revocation line,
closed the connection, and the mount stopped serving reads. I have not
tested releases other than 15.1 and 16.0-CURRENT, nor a CRL supplied
through -p instead of -l.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 301082] rpc.tlsclntd: the SIGHUP certificate recheck tests the KTLS flag instead of the verify result, so CRL revocation ne...
Author: bugzilla-noreply
Date: Tue, 24 Nov 2026 13:54
Date: Tue, 24 Nov 2026 13:54
16 lines
2479 bytes
2479 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301082 --- Comment #2 from laamalif@proton.me --- Created attachment 277652 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277652&action=edit setup-nfs.sh -- You are receiving this mail because: You are the assignee for the bug. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 301082] rpc.tlsclntd: the SIGHUP certificate recheck tests the KTLS flag instead of the verify result, so CRL revocation ne...
Author: bugzilla-noreply
Date: Tue, 24 Nov 2026 23:53
Date: Tue, 24 Nov 2026 23:53
25 lines
2793 bytes
2793 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301082
Mark Linimon <linimon@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #277651|0 |1
is obsolete| |
--- Comment #3 from Mark Linimon <linimon@FreeBSD.org> ---
Created attachment 277670
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277670&action=edit
tlsclntd-crl-fix.txt
^Triage: convert to git diff.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads