From: Jakub Kicinski <kuba@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net] xfrm_user: fix info leak in build_mapping()
Date: Mon, 6 Apr 2026 10:38:51 -0700 [thread overview]
Message-ID: <20260406103851.59a200fc@kernel.org> (raw)
In-Reply-To: <2026040634-deodorant-shakiness-a64e@gregkh>
On Mon, 6 Apr 2026 18:08:27 +0200 Greg Kroah-Hartman wrote:
> On Mon, Apr 06, 2026 at 08:58:59AM -0700, Jakub Kicinski wrote:
> > On Mon, 6 Apr 2026 08:54:49 -0700 Jakub Kicinski wrote:
> > > You're right, skb owner is responsible for clearing after put.
> > > Tho, Netlink is not as perf critical as real networking, I wish
> > > we at least had a helper which reserves the space and clears it :/
> > > This is not the first or the second time we hit this sort of a bug.
> >
> > We could make nlmsg_append() do that. Mostly because I don't have
> > a better idea for a name and nlmsg_append is only used once ;)
>
> As shown in my other patch:
> https://lore.kernel.org/r/2026040621-poison-gristle-aaa3@gregkh
> we need this in at least 2 places, don't know if it's worth doing it for
> all messages?
I was thinking -- add the helper so that we can use it in places we're
touching anyway. No need to mess with correct existing code.
> I guess nlmsg_append() would work? It tries to do some zeroing out for
> alignment for some reason...
>
> Want me to do that? I don't have a way to test any of this, I just
> found it using some static code analysis tools that looked at holes in
> structures.
Do you have any more Netlink leaks in the queue? If you do let's do it,
if you don't we can wait until the next victi^w patch to arrive.
next prev parent reply other threads:[~2026-04-06 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 15:33 [PATCH net] xfrm_user: fix info leak in build_mapping() Greg Kroah-Hartman
2026-04-06 15:54 ` Jakub Kicinski
2026-04-06 15:58 ` Jakub Kicinski
2026-04-06 16:08 ` Greg Kroah-Hartman
2026-04-06 17:38 ` Jakub Kicinski [this message]
2026-04-07 5:51 ` Greg Kroah-Hartman
2026-04-08 1:12 ` Jakub Kicinski
2026-04-08 5:42 ` Greg Kroah-Hartman
2026-04-08 8:32 ` Steffen Klassert
2026-04-08 9:30 ` Steffen Klassert
2026-04-11 11:26 ` Greg Kroah-Hartman
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=20260406103851.59a200fc@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.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.