From: Thaison Phan <thaisonphan@google.com>
To: edumazet@kernel.org
Cc: chia-yu.chang@nokia-bell-labs.com, davem@davemloft.net,
horms@kernel.org, ij@kernel.org, kuba@kernel.org,
kuniyu@google.com, linux-kernel@vger.kernel.org,
ncardwell@google.com, netdev@vger.kernel.org,
olivier.tilmans@nokia.com, pabeni@redhat.com, stani@google.com,
thaisonphan@google.com
Subject: Re: [PATCH net 2/2] tcp: accecn: initialize AccECN fields in syncookie path
Date: Mon, 16 Nov 2026 02:32:11 +0000 [thread overview]
Message-ID: <20261116023211.129862-1-thaisonphan@google.com> (raw)
In-Reply-To: <CAL4Wiipd8pVX8Rxkof+29iSmfoAC5tytsOh0afnovEwaZ4NEjQ@mail.gmail.com>
On Sun, Nov 15, 2026 at 09:13:02AM +0100, Eric Dumazet wrote:
> This is a different bug than the uninitialized fields above, with
> a different impact. I would prefer two patches, one per bug, but
> since both Fixes: commits landed in the same release I will not
> insist.
Makes sense. I'll make sure to split independent fixes into separate patches
in the future.
> Same remark as for the LOOPBACK4_IPV6 patch: KASAN does not catch
> uninitialized bitfields. Please say how the failure was observed
> (KMSAN, tcpi_accecn_fail_mode in TCP_INFO on the child, ...).
This was spotted by code inspection (with AI assistance) comparing
tcp_openreq_init() and cookie_tcp_reqsk_init() while investigating the
LOOPBACK4_IPV6 bug. We then verified it on a kernel with SLUB_RCU_DEBUG=y and
slub_debug=P (preventing reuse of the warm request_sock from the initial SYN),
observing bogus tcpi_accecn_fail_mode and tcpi_accecn_opt_seen values in
TCP_INFO on the accepted child socket (as well as tcpi_accecn_fail_mode=0x2
when the listener sends ECT(0) on the SYN-ACK).
I'll update the v2 changelog with these details.
> I think syn_ect_snt is always overwritten in cookie_{v4,v6}_check()
> before being read, this line is not needed?
Agreed, cookie_{v4,v6}_check() always overwrite syn_ect_snt before
tcp_get_cookie_sock() reads it. I'll drop that line in v2.
next prev parent reply other threads:[~2026-11-16 2:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 16:12 [PATCH net 0/2] tcp: initialize missing request_sock fields in syncookie path Thaison Phan
2026-11-14 16:12 ` [PATCH net 1/2] tcp: initialize ir_rmt_addr and ir_loc_addr in cookie_v6_check() Thaison Phan
2026-11-15 8:06 ` Eric Dumazet
2026-11-16 2:30 ` Thaison Phan
2026-11-14 16:12 ` [PATCH net 2/2] tcp: accecn: initialize AccECN fields in syncookie path Thaison Phan
2026-11-15 8:13 ` Eric Dumazet
2026-11-16 2:32 ` Thaison Phan [this message]
2026-11-16 14:16 ` Chia-Yu Chang (Nokia)
2026-11-16 21:58 ` Thaison Phan
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=20261116023211.129862-1-thaisonphan@google.com \
--to=thaisonphan@google.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=olivier.tilmans@nokia.com \
--cc=pabeni@redhat.com \
--cc=stani@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.