Article View: linux.kernel.netdev
Article #19319[PATCH net] rxrpc: Fix RxGK server to reject an expired ticket
From: Andrew Stellman
Date: Thu, 19 Nov 2026 18:45
Date: Thu, 19 Nov 2026 18:45
82 lines
14530 bytes
14530 bytes
rxgk_yfs_decode_ticket() decodes the ticket in a RESPONSE and builds a
key from it, with the key's expiry set from the ticket's expiration
time. Nothing checks that expiry before the connection is set up, so a
client holding a token whose ticket has expired can still open a
connection and have its calls delivered to the service. Section 6.3 of
draft-wilkinson-afs3-rxgk-afs-08 says servers must reject connections
secured with an expired token, and rxkad already rejects an expired
ticket in rxkad_decrypt_ticket().
Check the key with key_validate() after it is instantiated, and abort
the connection with RXGK_EXPIRED if the ticket has expired. A ticket
that expires while a connection is open is not handled here. As with
rxkad, the server keeps accepting calls on that connection but can't
send replies.
Reproduced on v7.4-rc3 under QEMU with the in-kernel rxperf server and a
small userspace client. The client's token has an end time in the
future, because the client won't use an expired token, but the ticket
inside it (encrypted with rxperf's test server key) expired 30 days ago.
Without the patch the connection is set up and rxperf reads the whole
request. Only its reply fails, with -EKEYEXPIRED. With the patch the
connection is aborted with RXGK_EXPIRED and no request data reaches
rxperf. A token with an unexpired ticket works either way. No other
kernel changes, debug code or error injection were used. There is no
rxrpc selftest.
The issue was found by Claude Opus 5.5 running Quality Playbook, an
LLM-driven code review tool:
https://github.com/andrewstellman/quality-playbook
The fix and this changelog were drafted with the same tool and reviewed
by me.
Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
---
A reproducer is available on request.
David, this takes enum rxrpc_abort_reason to 128 entries. Your pending
"rxrpc: Fix packet encryption error handling" adds one more, so with
both it has 129. In a small test, clang treats a __mode(byte) enum as
signed and warns that the 129th value wraps to -128. I can reuse an
existing reason instead if you prefer.
include/trace/events/rxrpc.h | 1 +
net/rxrpc/rxgk_app.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index 56dc9b614071..684034c67c69 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -97,6 +97,7 @@
EM(rxgk_abort_resp_short_yfs_key, "rxgk-resp-short-yfs-key") \
EM(rxgk_abort_resp_short_yfs_tkt, "rxgk-resp-short-yfs-tkt") \
EM(rxgk_abort_resp_tok_dec, "rxgk-resp-tok-dec") \
+ EM(rxgk_abort_resp_tok_expired, "rxgk-resp-tok-expired") \
EM(rxgk_abort_resp_tok_internal_error, "rxgk-resp-tok-int-err") \
EM(rxgk_abort_resp_tok_keyerr, "rxgk-resp-tok-keyerr") \
EM(rxgk_abort_resp_tok_nokey, "rxgk-resp-tok-nokey") \
diff --git a/net/rxrpc/rxgk_app.c b/net/rxrpc/rxgk_app.c
index 200a30064fae..34a3bdea531d 100644
--- a/net/rxrpc/rxgk_app.c
+++ b/net/rxrpc/rxgk_app.c
@@ -147,6 +147,13 @@ int rxgk_yfs_decode_ticket(struct rxrpc_connection *conn, struct sk_buff *skb,
if (ret < 0)
goto error_key;
+ ret = key_validate(key);
+ if (ret < 0) {
+ ret = rxrpc_abort_conn(conn, skb, RXGK_EXPIRED, ret,
+ rxgk_abort_resp_tok_expired);
+ goto error_key;
+ }
+
token = key->payload.data[0];
token->no_leak_key = true;
*_key = key;
base-commit: 1e575bda30acc0bf01f799cee798d4a1c100d538
--
2.43.0
Technical Details
Message-ID:
<20261119184541.26343-1-astellman@stellman-greene.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367251-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367251-linux-kernel-netdev=dewy.ru
From: astellman@stellman-greene.com (Andrew Stellman)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net] rxrpc: Fix RxGK server to reject an expired ticket
Date: Thu, 19 Nov 2026 13:45:41 -0500
Organization: Usenet Network
Sender: stellman@gmail.com (Andrew Stellman)
Message-ID: <20261119184541.26343-1-astellman@stellman-greene.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2954470"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6rWLf6riCrTUrQVlNYGLFMa7WI0= sha256:YVxDw1Ao2FgTXX974k8qjIg+cLpQZYe+CW7gkZZ69sU=
sha1:NoyHuerhCFk5m3J3zSnfx3867R4= sha256:7122oVd/1xUx/FKfZ3zh83kjcbgM75CGJSyknBKn1pc=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id AE942115737; Thu, 19 Nov 2026 21:46:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.95
X-Spam-Status: No, score=-2.95 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id ok476kKkE6Cx;
Thu, 19 Nov 2026 21:45:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367251-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 566B0115697; Thu, 19 Nov 2026 21:45:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 3C3441A2BC5; Thu, 19 Nov 2026 18:45:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795113946;
b=yoLeDuP5jsCFwXGx1CEKSQOpl3VaeuY4m+loXk+fNjc4kqKTlRDlAx/a3V774x81fwT7
awr0eVBvOpXybOGIJtb+Oc0G0wjU1ehAOojk6ajYnFgObP+YcB1beUHgmr3iuXQhhvQu6
zwVkO8ItgIkeEbA/VvTqOyht2AjHZIg2j+ZB8IOHZodYmWqjoxss7SWMF7vRu+W4rZn3C
a5A1KLLUb7+PzGvXIuytewzM1DZ1FV7xji2ddbKHCVga22MRyDegvWxfEYX+wrZcP3V+p
NAnPvul3l73go/3cPT5YWQbv9gxqizcbIMJFYfjmxOw4MjpQQSPBrmsoFrCKXK6rj0A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795113946;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Sender:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=Sv8olJzUFogc1iQqa1YZUkBH+/6GFReCOOw7AF+hLEw=;
b=PtXVkvAH9/Hg8z+e4+eqkQKM6u/8iXzcBlK1Pws/imzyj1q0Fr1TsjyDA1yr+LlcR+BD
2wBDN7xWpLOTjX5n33rUVhyYY+umQ+NPcPYIxIwbMcxBlhzg6ISG4EQZkkoedAgmbuW2s
JdQa5MrmvVazWUy4PazSVe0uKwqIYUOuch3EobTgDIwpLJRBs679lfp4Yg3uOqA7E/aa2
i8cRo6yqQL4VUjrR2797420mlMOszcWdDidVvmAkQgYSzZmump6nTZfMxtK0cViQnACBu
3DosfIr6LVpnICRAvITD/avHIomy82sOiekJheYGBsx5wrZCe3EkiwWoZMapHlSatDw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mjsISXao;
dmarc=none header.from=stellman-greene.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 76A9D606A33C;
Thu, 19 Nov 2026 18:45:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mjsISXao
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.173
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795113945;
b=tCuNIgyHD+m/7EDlLS63iLCca7Zai3ce7OU9D3v0AfeXS8CUDae7nXmpz93kVj2u8oFZ
SVcsn+UsBV+fOF8KAqAMbcWDSt+b3pUBxCK58W3fPhDdKBGl2loJlQY7xMq1jQrlehALQ
PDcKq0eKR2v8Gnt/9strp9hwLFL4vN/tX8Irr5712KJEaFbBRuCtPsyk1V+4vt2NpMoQk
eR2+PxwQe81zsftLLnMi2ZcKcXLce3wwKrnE6E5IAaTsGAYdQbsIzrz4dtkhTGavtLtTp
TKdNPbqluo7GAkD8jeyYNcTbMtJzFNCPCdQuGoCrQy52MKCyyov/RxiiZJj5Cfn7g2g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795113945;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Sender:From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
Content-Transfer-Encoding;
bh=Sv8olJzUFogc1iQqa1YZUkBH+/6GFReCOOw7AF+hLEw=;
b=Iap7GutqdY69tRAvu2gx6rLvdyZqJTEqL4YkmExleHUnxi0iEjIT4yNyWIgOk3AGOijh
yfCW+cZl2S2AE9cFKIQqntHYC7T16vJi/7RVXKzvn8BloHDFDbQf7lt4HywU/2pK/tn4I
U5X5V+ynXq/enxW5BD6vVfxD7+5uyTIv6WmlPbu1l5XyDima5anpz2ObHMK9zZHRSp4EK
Yy3VmMbnhb5CGkNxjXvYUq2uEEznYtfiGoqqtrhiwfEk3YFXXPW6Mfx1MiU2TcCSRzD1u
8BU8Hb2lwaPRViY8DOZgenI/cjk6pEZMieN8VtJh9L6pCbcsMlXA6nK1XRHjkguxG2g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=stellman-greene.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mjsISXao;
arc=none smtp.remote-ip=209.85.222.173
X-Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B79606A331
for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 18:45:45 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 46B79606A331
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-9496400270fso8162685a.1
for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 10:45:45 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795113944; x=1795718744; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:sender:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=Sv8olJzUFogc1iQqa1YZUkBH+/6GFReCOOw7AF+hLEw=;
b=mjsISXao+1fqWbCM2EmEZT24xMN2dtJQyiVGCHZmYNtxPU0aZtbvytwe1VkM2FZgyf
lb1LvEv4c71QJ+hbmUSevk6L0FEeSoEIEa1e52CInSYxyGpmh2/HDUytIQZQcCzfLBqM
hm1mA+68xJjp3rxm61rSIEi6kFHxy75oZ5bihX61FTD4+XVxD6o6X6mtbHkr1to00E8r
1Qhj2/lXJukRLsyXIUeNVqpQO2a8xgz9+55XX+NHgIGkNcMJJEgt+4d5EgHPwcdiHJwc
Jb4CV+rl5kA8HaaU4gy4ga/WAYZS2BQ7O3DtMedvlPbW+dj7eXH0bU3cf6Mqm2PF12Cw
rXzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795113944; x=1795718744;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=Sv8olJzUFogc1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o
cOjcVDhYBU26TMShWWNEEt7i/US98X+y4l4Q5SvzuyahaWeFgUQPvGptn0rCXF0HrFuMWXhERgF
KhbRFoFqk13eFGRrU7uxyEKr2nhuItNRjwE9WkFFZR3QoNyLt27qVLWV3FYkYlxFhwWI1xvHpz0
7Z4A2yAtIfGGOoo4tjo4zvYw1Rc+MSvfWnWQw4y+BeltNm4Oq1uN4XXjvWPpKsYuzWE1ZP/vWkS
6paVo2ahM5SBmVJKCtqEwV72Ds95MaVz+ZjAixL0QA5N3QNqBYmrkYkAi+Ys3vk48FOLcxBrdzV
ALPNHU01Nbom6NpduX6EmJzmWYwnM=
X-Received: by 2002:a05:620a:271a:b0:949:7473:b1a5 with SMTP id af79cd13be357-949bab1d726mr76159685a.55.1795113944016;
Thu, 19 Nov 2026 10:45:44 -0800 (PST)
X-Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:c935:f347:a919:9f78])
by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb3c2abesm21186085a.26.2026.11.19.10.45.43
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Thu, 19 Nov 2026 10:45:43 -0800 (PST)
X-Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
linux-afs@lists.infradead.org,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.53.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list