Article View: muc.lists.freebsd.bugs
Article #730[Bug 301082] rpc.tlsclntd: the SIGHUP certificate recheck tests the KTLS flag instead of the verify result, so CRL revocation ne...
From: 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
Technical Details
Message-ID:
<bug-301082-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 301082] rpc.tlsclntd: the SIGHUP certificate recheck tests the KTLS flag instead of the verify result, so CRL revocation never fires Date: Tue, 24 Nov 2026 13:53:54 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-301082-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="10695"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795528434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g92dZx+l7Bs3F96iMKYn/0MEKVoEBF00lYXI0fVeAJU=; b=TZmh4JxTVRHI4s9mxbZEOdXbnM8E9YNEKj6pUfnpjqeyrCTTAxNzrSnKYxYppQs82ZHkah NufOaQxk/nYovv3AKpL1zGpAaZWYi2oTqtXUqS/1Q2v7He2qkmfYlJudHjYhl/aR5opEtq TcK1z437PeQfzaLqNNCIfOsbmvj4w0ZemTMpM6WVudBeHnWlcAKGrk9lVanb8S4GGaNpSL MCK4nPrRNI1JlRnO7c5JXXs78OE5Y9Fu41rjOly5mYRktWUdbsis8SD5KmpGbhCks7ywSb 0qcDfkjP0j9J1AstmWaZd245fUXF0vekGXMaD/cNFtcO+9CDAz+Be0WtKSvyew== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes