From: Ido Schimmel <idosch@nvidia.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>, Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Yiming Qian <yimingqian591@gmail.com>
Subject: Re: [PATCH net] ipmr: prevent info-leak in pmr_cache_report()
Date: Thu, 30 Apr 2026 16:10:55 +0300 [thread overview]
Message-ID: <20260430131055.GA976630@shredder> (raw)
In-Reply-To: <20260430070611.4004529-1-edumazet@google.com>
Nit: s/pmr_cache_report/ipmr_cache_report/ in subject
On Thu, Apr 30, 2026 at 07:06:11AM +0000, Eric Dumazet wrote:
> Yiming Qian reported:
>
> <quote>
> ipmr_cache_report()` allocates a report skb with `alloc_skb(128,
> GFP_ATOMIC)` and appends a `struct igmphdr` using `skb_put()`. In the
> non-`IGMPMSG_WHOLEPKT` path it initializes only:
>
> - `igmp->type`
> - `igmp->code`
>
> but does not initialize:
>
> - `igmp->csum`
> - `igmp->group`
>
> Later, `igmpmsg_netlink_event()` copies the bytes after `sizeof(struct
> igmpmsg)` into the `IPMRA_CREPORT_PKT` netlink attribute and emits
> `RTM_NEWCACHEREPORT` on `RTNLGRP_IPV4_MROUTE_R`.
>
> As a result, 6 bytes of stale heap data from the skb head are
> disclosed to userspace.
> </quote>
>
> Let's use skb_put_zero() instead of skb_put() to fix this bug.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reported-by: Yiming Qian <yimingqian591@gmail.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
FYI, I checked and ip6mr_cache_report() seems OK.
next prev parent reply other threads:[~2026-04-30 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 7:06 [PATCH net] ipmr: prevent info-leak in pmr_cache_report() Eric Dumazet
2026-04-30 13:10 ` Ido Schimmel [this message]
2026-05-02 0:10 ` patchwork-bot+netdevbpf
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=20260430131055.GA976630@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yimingqian591@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 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.