Article View: linux.kernel.netdev
Article #14044Re: [PATCH net-next v6 4/6] tls: update the RX key when a KeyUpdate is received
From: Martin Belanger
Date: Tue, 10 Nov 2026 16:49
Date: Tue, 10 Nov 2026 16:49
39 lines
12944 bytes
12944 bytes
On 11/9/26 12:18, netdev-bot+sashiko@kernel.org wrote: > [Severity: Medium] > What happens when the KeyUpdate is not the first handshake message in the > record? Valid. A record with [NewSessionTicket][KeyUpdate] is legal (RFC 9846 section 5.1), and the check reads only the type of the first message. Mainline has the same gap: tls_check_pending_rekey() does not set key_update_pending for such a record either. With a registered RX secret the result is worse, because the kernel owns the rekey and the connection ends on the next record. v7 will check every handshake message in the record. A KeyUpdate that is the last message will be handled. A KeyUpdate followed by another message will end the connection. > The RFC does not forbid a KeyUpdate that ends a record with several > messages, and the rule the code enforces is in section 5.1, not 4.7.3. Agreed. The commit message in v7 will cite section 5.1 and describe what the code does. > Could the comment be reworded so that a future caller doesn't assume the > old key still works after a failed rekey? Yes. In v7, the kernel-doc will say that the key may be unusable after an error, and that the caller must end the connection. > Should Documentation/networking/tls.rst be updated to match this > behaviour? Yes. v7 will update the "TLS 1.3 Key Updates" section and the statistics. TlsRxRekeyError will count every received KeyUpdate that ends the connection, not only the rate limit. pw-bot: cr
Technical Details
Message-ID:
<83246c2b-6663-4c52-95f0-50dac116570b@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360444-linux-kernel-netdev=dewy.ruReferences:
<20261105-keyupdate-rfc-v6-4-99b695f9eb4f@gmail.com> <179424471155.994134.17986033334400694237@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360444-linux-kernel-netdev=dewy.ru
From: martin.nvme.dev@gmail.com (Martin Belanger)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 4/6] tls: update the RX key when a KeyUpdate
is received
Date: Tue, 10 Nov 2026 11:49:33 -0500
Organization: Usenet Network
Message-ID: <83246c2b-6663-4c52-95f0-50dac116570b@gmail.com>
References: <20261105-keyupdate-rfc-v6-4-99b695f9eb4f@gmail.com>
<179424471155.994134.17986033334400694237@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="654237"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YM4Ls5bmqOGIP2TRyeCPqODfD+Y= sha256:c5LBgG2cbyYxELEdpX0SbcjJcWVKUZ5a2Zl4H2O9ZL8=
sha1:WyMSdY+XdmnhpFElcOoO4fBuATg= sha256:ov47rjJO9NmZcDq6sLo6++pmUBLZ7wpWj4SnrhDjHgA=
Content-Language: en-US
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 2F016113C67; Tue, 10 Nov 2026 19:57:25 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, 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] 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 O_sFh8FnZA3x;
Tue, 10 Nov 2026 19:57:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-360444-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id E9F2B113C1C; Tue, 10 Nov 2026 19:57:13 +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 7574A100AC1; Tue, 10 Nov 2026 16:49:44 +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=1794329381;
b=Xw/6c/3ApPUQLZXnqn4WU8uuHXY0id07kT6p077TEMrO4BTVAn+54y53fz9Cce3uXdAR
1UofoNq42jqbHW1s5xZQc/Cx6pbXKeRpfY9ilb7pH8wXZdKeVn4Jix9cwQ22YzjZswCiG
kroCSwg0R31p7kjxDCPAIqvYPwgJUEb2J4aVL/Fd5tPq0gmzPnw09kugvdr/zQXZBnIKQ
qVzSYxmrapNeMLeqC8q+fZAxxa5/OkI70bQXqaKcKQlXlWrF+HOTxxftWdVl+1DDt0MJP
FYK4rsJMX50Q72Txr1YimxwG0HoLm91/kk0kU5fmvMSvilSRsuqpwgDW/Xmdj7/sCSA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794329381;
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:Message-ID:Date:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=tP18IBGb4RAX2VQoul/BsJwOYmY36Sb1G+z0aM3/z1I=;
b=n6SdDp2FSbyNVzIkcRNFKY5C2VonUZ35CDWA2u7+ksIaV2EG6QbHSQ2eQu6NSs/wOU+n
XAJwd1UryPb0pUz1Z51xLqp2rjBNpcmiglMa4duycO2N6FT0Pl1lMrWk6PZOuAwJjzDc+
5Rp2jQ4rLe4m2iPbcPzd1XgVPTQJd1AZg29RKUABWisik7Xc/aLUVOtETl6ukm/v7NMLW
SrK3UtEpUJ1+MwIs8tBENkbIgzh6RfPTeENiALin1KB2EveILrdr8+6txQuTgBYFjFkVT
/aJgCHDJCeHhT6Utjf1zK/uxHD3TjNinc9BmP5+4oVaLBKJhrQX4bB5ACaLT4/q1AMA==
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=sd9gmcUC;
dmarc=pass header.from=gmail.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 AF090606A339;
Tue, 10 Nov 2026 16:49:41 +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=sd9gmcUC
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.135
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794329380;
b=AYnVPo7ks7X7FwRexowMFqLC5Ny+v4q6+9npUMHm3dDzSq/Y0/lt2w1YyLndYySUAQ+0
ZFaixqiiJBmrmLI1chQ/Mt/37DnMkv6aH+8QYlJ285Hg9AyPcU3E4eeRh/rDSiTtxPKDm
nGunBemr413K2HT3jC1Y+XfxI531PyVr1dskVWYkVAkPdYrotXtUwELG3PpxdZ2WhZHV3
/AALVUYMcjNgN9LNL7X0B5HC6kSLqACNcTuMpAL9/UcSQwk8hlaoUdG8qheVJ1WgEqRqe
OST1491bEw3MOgmGRRFYauNinX1Jl86cDGYElAJ25Lq1uHfrwa2LqxW44ZbHaQTWBLw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794329380;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=tP18IBGb4RAX2VQoul/BsJwOYmY36Sb1G+z0aM3/z1I=;
b=idMePnLWYUvz57BO+slZvnC8gbsWs0VNpEBMuUoBgZjBw1Tvt/JWG98Wc9BoHTzZBORq
Ve6BtDLyHDw0mhKZTzwapjoE7e8SnAGDOITLC5LdiyBi8FJppSJaBRBv49ggRwHVNUtli
pcTldQrenl7VQTHhlk3Dts1Kk9wTmwxVrdUrZK3IvPi1kfLD9I5+9NGoBfstZFRQBpOy+
rR6WxOb8ItjH+ro8MJcJjM2gHJP29zI+vULsmH08ZffhDPq39eHyBvCUZbb/4XXwelIFA
7TFfQbSVnwPitdWQxroTfFYNXVz7vlbV/ZIlwyf3eibja7ArhjupHAVtilfUeZ3zh0Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.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=sd9gmcUC;
arc=none smtp.remote-ip=74.125.224.135
X-Received: from mail-yx2-f7.google.com (mail-yx2-f7.google.com [74.125.224.135])
(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 7B769606A325
for <netdev@vger.kernel.org>; Tue, 10 Nov 2026 16:49:40 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B769606A325
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx2-f7.google.com with SMTP id 956f58d0204a3-67a19a2621dso1548806d50.0
for <netdev@vger.kernel.org>; Tue, 10 Nov 2026 08:49:40 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794329379; x=1794934179; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=tP18IBGb4RAX2VQoul/BsJwOYmY36Sb1G+z0aM3/z1I=;
b=sd9gmcUC5EjvUfKx68rTBxuM9bdbaznz/tEwxEWenOWnU4qLBJS8XdmeO9Tqxwj+lw
oW3msGNKD6Cc/5Hqirx1MWT8/n2v8Qjm9PUcuicql2WYq+rF8q44tafK9hFR2FUQ9pYp
OvMf+F5cXA6oZ3QGRiy68Xwm+LHm3/qhIh+r4ya2txJhybsQZsYqO293qHl5BNjQg7xu
kRJyWMJJrSkEmzH+uxkug5xGmR3DD1NLa4QS4lTBW9dhmtICsLwf/0BnRL47ootGLSEC
AF1ORHoqamMIBedGpXGvtYQ5Rp3f+VaA19VjR2KGUb+z3qUm3l7PYU9mWCi/qlXOPrJL
wMAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794329379; x=1794934179;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=tP18IBGb4RAX2VQoul/BsJwOYmY36Sb1G+z0aM3/z1I=;
b=CMNSyOALDuhli5RQWPf+MF2kpOxTb/Ysm4JR5uNMWJpqdLQ8gc0rO45hwSLy4QMTyw
YClnzXRFzj7v47nHe+iTrQKmXnScouSg7NPkuUziNAuI1ufY1INktl/ltO4u9e9IQD8B
ZQ7EZpuePL8vNaKgssywGi9KWaMtlsK078Iv8lSGFlQ+3yiOXbbelyx3nzNNXibPHGgh
sT/BouycRNMbhFms/VRgzL1h8W/OfsJMleYzf7ZtXimVQ5zPWWf67xJH+QMtzRElRjpx
v4i0FXkwdELqzBgE+lwjbtcyaTRMDGEKoP0b4+rAIDEWg5WTJ18Qhe+tUf9U5cm9Xhey
Yj+g==
X-Forwarded-Encrypted: i=1; AL+hErFmCzJo11bld0xITLgIIYcOCeCJZzHz59MydskOx1VI6wcXhFpa+E6V4XI787Lnn1zo1ZGnONc=@vger.kernel.org
X-Gm-Message-State: APuU4Z/BaX9VIwRIbZAWlUPmhX+m8CXjCrzzkILKRnFuD45Cy8JIfXzP
nHQQQ/rqZJWadF2QSG5W3LBov8aIHzqmYp4ydo678AHI6ac91Kvnd+3Z
X-Gm-Gg: AYBFou1gqRWBMuw81YEIPEWBZPeSLXMPITKdh3dz+PDGjEUdrv+ES3xATj4W+vlxa6E
iZ42Z1NEPRAU9nPppUW6cVVNF1ktD/2pPTnUaRoeG5XCZglFLPxC1pPWZ/rrKLjmdMblI1gxVT2
q9gD9v3CvxFddHR+8FHupvUk9jYeBnHQ5Y1ZELPsetYW6Nd+GHZdZiKhuyBuQMOB0AbhS7/fFrN
P7lnnxJ7PI906WXEpyjoe2qLhDJT6Z5UBTxl1yfQSMQ062vY1n0gwvxOXuTMv4ecVabdscc3oPA
hti7AJ6vZqB5YxY/b5wnuvzicBTk2LDoUIp0YNgnq2mv8Sv6gcTO1rKKor1uxq6VUdzGhkrVjfO
/MMbybef2FmKw9M6QA3LxsAB+ppzm6O1uYAgqUTX+vpFvBk9MldcPLRDVBdiciF3b0aI2oEf5iS
dch6Gga8qcbPAdDy1/LyPQZJLIQIL5UQ1FUgZq7LiNzUjlpYczC3037AfYT16mDbaRKyelo8IGF
g5DuBRbCG2UdQZO4+Cta7MF7yQRaku4phADe8JoCBA9GFm1CRlnp+0rQYLMtdeUKbD0j2fB00nT
B/XIya207QkjO0tjk7gL8Tep8UqDTdV1I+aHnpalgcgsPP3zWRWDMc9pPw==
X-Received: by 2002:a05:690e:12c3:b0:67c:fa4:2b9f with SMTP id 956f58d0204a3-67c566077bbmr2140240d50.15.1794329379380;
Tue, 10 Nov 2026 08:49:39 -0800 (PST)
X-Received: from [10.0.0.48] ([71.69.222.122])
by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67c589a2354sm2244105d50.6.2026.11.10.08.49.34
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Tue, 10 Nov 2026 08:49:38 -0800 (PST)
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
X-User-Agent: Mozilla Thunderbird
X-Cc: john.fastabend@gmail.com, kuba@kernel.org, sd@queasysnail.net,
davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org,
rdunlap@infradead.org, shuah@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, hare@kernel.org, cel@kernel.org,
kernel-tls-handshake@lists.linux.dev, alistair.francis@wdc.com,
martin.belanger@dell.com
X-In-Reply-To: <179424471155.994134.17986033334400694237@kernel.org>