Article View: linux.kernel.netdev
Article #19932Re: [PATCH net] rxrpc: Fix RxGK server to reject an expired ticket
From: netdev-bot+sashiko
Date: Fri, 20 Nov 2026 19:05
Date: Fri, 20 Nov 2026 19:05
73 lines
10758 bytes
10758 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] rxrpc: rxgk_yfs_decode_ticket() misses negative and epoch-
truncated expiries
--
> diff --git a/net/rxrpc/rxgk_app.c b/net/rxrpc/rxgk_app.c
> --- 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;
>
[Severity: Medium]
This check only works when the ticket's expirationtime turns into a
positive number of seconds in key->expiry. Two cases get past it.
First, if expirationtime is at least one second before 1970-01-01,
rxrpc_s64_to_time64() returns a negative value. In that case
rxrpc_preparse_xdr_yfs_rxgk() jumps to its expired label, so
key_instantiate_and_link() itself fails with -EKEYEXPIRED. That error
takes the existing "if (ret < 0) goto error_key" just above and never
reaches the new rxrpc_abort_conn() call.
Back in rxgk_extract_token(), the cant_get_token switch only handles
-ENOMEM, -EINVAL and -ENOPKG. -EKEYEXPIRED falls through to
temporary_error, so the RESPONSE is quietly ignored instead of the
connection being aborted with RXGK_EXPIRED. The connection is left
sitting in the challenging state as if the error were transient.
Second, a non-zero endtime within one second of the epoch, in either
direction, is truncated to 0 by rxrpc_s64_to_time64(). The "expiry <
0" test in rxrpc_preparse_xdr_yfs_rxgk() lets that through, so
key->expiry ends up as 0. key_validate() treats 0 as "never expires",
so this expired ticket is accepted.
Both cases need a ticket encrypted with the server key, so they are
edge cases. Still, the point of the patch is to reject expired
tickets.
Would it be better to also map -EKEYEXPIRED from
key_instantiate_and_link() to the RXGK_EXPIRED abort? That could be
done here or in the cant_get_token switch. Separately, a non-zero
endtime that truncates to 0 could be treated as expired in
rxrpc_preparse_xdr_yfs_rxgk(). Alternatively, the ticket's endtime
could be compared directly against the current time here rather than
going through key->expiry. Which approach do you prefer?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119184541.26343-1-astellman%40stellman-greene.com
Technical Details
Message-ID:
<179520152436.3135.2656252511958141770@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368092-linux-kernel-netdev=dewy.ruReferences:
<20261119184541.26343-1-astellman@stellman-greene.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368092-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] rxrpc: Fix RxGK server to reject an expired ticket Date: Fri, 20 Nov 2026 19:05:24 +0000 Organization: Usenet Network Message-ID: <179520152436.3135.2656252511958141770@kernel.org> References: <20261119184541.26343-1-astellman@stellman-greene.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3240189"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:K2bxRTRtc70eiMYuLco/APq0ti4= sha256:nhnO1KrEE2aqgtAOd+IHa00pM7EtFz/zhDoId7ysD94= sha1:dLu5qxxZICAHqZe/+M244BXkngQ= sha256:82H8fJ98KT1VslNGH9YeV4LNvHBUXJglgUnUfLUZm2I= 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 27C07115A54; Fri, 20 Nov 2026 22:05:41 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.5 X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 049AxmeeAicZ; Fri, 20 Nov 2026 22:05:37 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-368092-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 0C4CA115A47; Fri, 20 Nov 2026 22:05:29 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 9B26560BC85; Fri, 20 Nov 2026 19:05:28 +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=1795201526; b=CO7sDrAnAK6m+MwOg5kx6oabQ1XUQkMumO11vFA05+AQpOttTaT6nAJAPAfQd6Zru+2v JNm36UsqDyoTktGvrS6eTxyLNGHq5doE6FwMjhvz9mZ4gBhHK4LigCqUBAf8h8lWIWDR4 4HLihlLZScHEV4UeIMeksKHYDXMzSKJphwDAm8ykfN8wwtuZsB3gnwRac0KtVtEt2Be/B Qj91TD0QH79avL4xA8Wy6q5eNNwh8WgiD5k8CsjYab09sETl2qX1e5XtYtqc1CTScBGh0 Yi+EM+IXIdYcN3wxLeclu4FvoQD0xKRyCEjPhFReA69L+kUpnFW9zbLFob3NvoYJMLg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795201526; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=OHUdfdJuFdkLiCDSC25vd9dlFBeZzojZJSwQE6bKq78=; b=hem/7oK09IsyiqkCvzZ1/3ag7fnDO1+HueLzsBdl1nwUHy6ezRtWW+M5sz5n1dFzGuTG mKPu5MOq85TJFBIvThsQqu1TfD4ZDXQOc1LsmosRMLjrYmclZMQwugw7BDTAngWtzBfpN Ua3Qgw2R6OKhaO0gHqU3hlGvxbLMAuEvh5RiRmRDsoVMiKbIKX18Z//5f6ayITn1eDsYU xAYu4laeUtdidkmwtlZqI9C2D4lxn+hOOwIF1STm1hen6ogph7yFdjU6udICz9D3213KX ddU+KP6vLwrMGOR2Uni/MqG1swQUTIxdAxPwj2ntw+NQKE7aqyUCrsv7OYqU0FQUT3w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="YuRs/szp"; 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 C4BA660A261A; Fri, 20 Nov 2026 19:05:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YuRs/szp X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795201525; b=gwBdwbrp6KMLuk0+n2u40g08JAtdgpq4jQjfcnrDMBHrvYOsmacQJSN/xfNyr6m3A3y8 9SXRHkTRnBmWedEIRR53ksVGWw1xbPUA7+bxppXGDmDsP4NVoalOfEcdnr293R8V9HDNX y0IvAxhXlnO26+3RLZ2lMAoqyiHYaeutrnDOBKqXqR0L+PD7okvXNKqG7ZYWW0RAgI15b ziSPn6MuVIYpI89MrVvhSdNh9SHHHZoUVHkhp6lVTp4t3A68Y4Lqo0urVlFrtHZUli/rt AM8H9rmULQ3VsFsLNuADeT+x2YqZ3AUgm1G9pwGGPQNiJkJEGkZ4VtGSGxT7LsBqmng== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795201525; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=OHUdfdJuFdkLiCDSC25vd9dlFBeZzojZJSwQE6bKq78=; b=kuN+Ke/yV+2LPts/4oNviaG8giJQ42cdrZAozsfbDohzvCvYgrXyfT3Jzk10Xek+HaGV DVmT186bVPaknCpPkutKz6HeFh55BoK8Rkahj7EmkIpl5w7s/GFSuSYYCXGL/MMoFZp06 6/ey9UOXtV6Upr8dFqcgcgjOGr5QC9bX5yKT4pPU89dg1JXxHt/NoRwB6K+V1zGwWFpGp z9i+Dc3ua1pdqp5HMopR58YSHrfNCJjuH6hNlrYIMCUyqXW7SUwGlh5PFuH9wCEVUvZGj yIS53BlwPtXj7dxccuUuAevSboQnQvfMMPRawpI6zyvyVNekZg6rUDwEiyXR4JQyl/A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="YuRs/szp"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF3AB60A2624; Fri, 20 Nov 2026 19:05:25 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAEB91F000D4; Fri, 20 Nov 2026 19:05:24 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795201525; bh=OHUdfdJuFdkLiCDSC25vd9dlFBeZzojZJSwQE6bKq78=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=YuRs/szpWRCHcRJopChOIyKkJfQmlxZag+6Y3/iZ2CmD2YDXcj5J6fL+dN3tw6bU+ WIErB8/LYzwnUOKRWrRcI+lNfNMI1ygKoFM5VZ8h/uIE8W3FgwagMXsWG8LqKKYwhm uPoiBvD2EfX5iopZWhJmw2s+Sp9rI74ZZgfekEC0JgA0ScICDANC7JtGCMHqgNEfiy v1/4Lvevw7P6yMidSbowUlcRMR+X3awHceGp1pfERCpETbJQqaODs0eT2YzMrGvykf v5512IW+jQG3FmDY3ndkj1f2Z/YtC9Lcg7iX3WPaQ0Nl959FJcnc4WQ444zfz8Flt0 5jwFC3/4wzz+w== X-Cc: dhowells@redhat.com, marc.dionne@auristor.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261119184541.26343-1-astellman@stellman-greene.com> X-sashiko-severity: Medium 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