From: Steffen Klassert <steffen.klassert@secunet.com>
To: Shubham Antil <shubham@octane.security>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Giovanni Vignone <gio@octane.security>
Subject: Re: [PATCH] xfrm: zero-initialise km_event in replay-notify to stop stack disclosure
Date: Wed, 7 Oct 2026 08:54:43 +0200 [thread overview]
Message-ID: <asXss4xSHDfrkMFs@secunet.com> (raw)
In-Reply-To: <20260930093137.7163-1-shubham@octane.security>
On Wed, Sep 30, 2026 at 03:01:37PM +0530, Shubham Antil wrote:
> xfrm_replay_notify(), xfrm_replay_notify_bmp() and
> xfrm_replay_notify_esn() declare a struct km_event on the stack and
> initialise only its .event and .data.aevent fields, leaving .seq and
> .portid uninitialised. build_aevent() copies those two fields into the
> XFRM_MSG_NEWAE netlink message header via
> nlmsg_put(skb, c->portid, c->seq, ...), and the message is multicast to
> the XFRMNLGRP_AEVENTS group, so two dwords of uninitialised kernel stack
> are sent to group listeners on each replay event.
>
> The request-driven paths set these header fields from the requester
> (xfrm_get_ae() / xfrm_new_ae()); only the kernel-originated replay path
> leaves them uninitialised. Zero-initialise the event so the header
> fields are sent as 0, the correct value for a kernel-originated
> notification.
>
> Reported-by: Giovanni Vignone <gio@octane.security>
> Assisted-by: LLM
> Signed-off-by: Shubham Antil <shubham@octane.security>
As this is a fix, please add a 'Fixes:' tag.
Thanks!
prev parent reply other threads:[~2026-10-07 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 9:31 [PATCH] xfrm: zero-initialise km_event in replay-notify to stop stack disclosure Shubham Antil
2026-09-30 9:34 ` netdev-bot+sinfo
2026-10-07 6:54 ` Steffen Klassert [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=asXss4xSHDfrkMFs@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gio@octane.security \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shubham@octane.security \
/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.