From: Martin Belanger <martin.nvme.dev@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: John Fastabend <john.fastabend@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Sabrina Dubroca <sd@queasysnail.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
Hannes Reinecke <hare@kernel.org>, Chuck Lever <cel@kernel.org>,
kernel-tls-handshake@lists.linux.dev,
linux-nvme@lists.infradead.org,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH net-next v5 4/6] tls: update the RX key when a KeyUpdate is received
Date: Wed, 4 Nov 2026 18:34:48 -0500 [thread overview]
Message-ID: <0f61c649-6e27-4f09-a69f-026f91d89848@gmail.com> (raw)
In-Reply-To: <sashiko-outbox-198140@kernel.org>
On 11/4/26 16:43, sashiko-bot@kernel.org wrote:
> > + memcpy(crypto_info_salt(info, cipher_desc), iv, cipher_desc->salt);
> > + memcpy(crypto_info_iv(info, cipher_desc), iv + cipher_desc->salt,
> > + cipher_desc->iv);
>
> [Severity: High]
> Won't these memcpy() calls trigger a CONFIG_FORTIFY_SOURCE field-spanning
> write warning when tls_check_pending_rekey() -> tls_keyupdate_rx() ->
> tls_keyupdate_rekey() runs on a socket with a registered traffic secret?
I could not reproduce this. I built with CONFIG_FORTIFY_SOURCE=y and
GCC 15.2 and ran the keyupdate selftest with TLS 1.3 AES-GCM. There
was no warning. In this build, __member_size() and __struct_size() of
both destinations are unknown (-1), so the field check is not compiled
in.
The result depends on the compiler. A small user space copy of this
pattern gives a member size of 0 with GCC. In the next version I will
take the info pointer from the union itself, as c43c1c24f3cd does for
the same reason.
Martin
next prev parent reply other threads:[~2026-11-04 23:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:43 [PATCH net-next v5 0/6] tls: perform TLS 1.3 KeyUpdate in the kernel Martin Belanger via B4 Relay
2026-11-03 21:43 ` [PATCH net-next v5 1/6] tls: add HKDF-Expand-Label for the TLS 1.3 key schedule Martin Belanger via B4 Relay
2026-11-03 21:43 ` [PATCH net-next v5 2/6] tls: add socket options to register the traffic secrets Martin Belanger via B4 Relay
2026-11-03 21:43 ` [PATCH net-next v5 3/6] tls: loop in tls_sw_splice_read() until it has a record Martin Belanger via B4 Relay
2026-11-04 7:42 ` Hannes Reinecke
2026-11-03 21:43 ` [PATCH net-next v5 4/6] tls: update the RX key when a KeyUpdate is received Martin Belanger via B4 Relay
2026-11-03 23:35 ` Daniel Pereira
2026-11-04 7:42 ` Hannes Reinecke
[not found] ` <sashiko-outbox-198140@kernel.org>
2026-11-04 23:34 ` Martin Belanger [this message]
2026-11-03 21:43 ` [PATCH net-next v5 5/6] tls: send a KeyUpdate at the record limit and on request Martin Belanger via B4 Relay
[not found] ` <sashiko-outbox-198141@kernel.org>
2026-11-04 23:35 ` Martin Belanger
2026-11-03 21:43 ` [PATCH net-next v5 6/6] selftests/tls: add KeyUpdate tests Martin Belanger via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f61c649-6e27-4f09-a69f-026f91d89848@gmail.com \
--to=martin.nvme.dev@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hare@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kernel-tls-handshake@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sd@queasysnail.net \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®