Re: [PATCH net] xfrm_user: fix info leak in build_mapping()

From: Jakub Kicinski

Date: Mon Apr 06 2026 - 11:59:53 EST


On Mon, 6 Apr 2026 08:54:49 -0700 Jakub Kicinski wrote:
> > Note, I think this is correct, as I don't think a new skb has it's
> > fields pre-zeroed out, or am I totally wrong here?
>
> 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 ;)