From: Fernando Fernandez Mancera <fmancera@suse.de>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Wayen Yan <win847@gmail.com>,
netdev@vger.kernel.org, lorenzo@kernel.org, horms@kernel.org,
pabeni@redhat.com, kuba@kernel.org, edumazet@google.com,
andrew+netdev@lunn.ch, angelogioacchino.delregno@collabora.com,
matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next] ipv6: initialize ipcm6_cookie before parsing control messages
Date: Tue, 21 Jul 2026 16:47:13 +0200 [thread overview]
Message-ID: <178464523384.7942.1381538265158230893.b4-reply@b4> (raw)
In-Reply-To: <178464510579.7763.6518393222506443032.b4-review@b4>
On 2026-07-21 16:45 +0200, Fernando Fernandez Mancera wrote:
> On Thu, 09 Jul 2026 16:32:30 +0800, Wayen Yan <win847@gmail.com> wrote:
> > ip6_datagram_send_ctl() parses both SOL_IPV6 and SOL_SOCKET control
> > messages. For SOL_SOCKET messages it passes ipc6->sockc to
> > __sock_cmsg_send(), which updates fields such as tsflags with
> > read-modify-write operations.
> >
> > The IPV6_2292PKTOPTIONS and flowlabel option paths only set ipc6.opt
> > before calling ip6_datagram_send_ctl(). If a SOL_SOCKET control message
> > such as SO_TIMESTAMPING_* or SCM_TS_OPT_ID is present, this can read
> > uninitialized sockc state.
> >
> > Initialize the ipcm6_cookie with ipcm6_init_sk(), as the normal IPv6
> > sendmsg paths do, before overriding ->opt with the temporary option
> > buffer.
> >
> > Signed-off-by: Wayen Yan <win847@gmail.com>
> >
>
> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
>
> Thanks!
Now that I think about it, shouldn't this go to net tree with a proper
fixes tag?
prev parent reply other threads:[~2026-07-21 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 8:32 [PATCH net-next] ipv6: initialize ipcm6_cookie before parsing control messages Wayen Yan
2026-07-21 14:45 ` Fernando Fernandez Mancera
2026-07-21 14:47 ` Fernando Fernandez Mancera [this message]
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=178464523384.7942.1381538265158230893.b4-reply@b4 \
--to=fmancera@suse.de \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=win847@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox