From: patchwork-bot+netdevbpf@kernel.org
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: linus.walleij@linaro.org, alsi@bang-olufsen.dk, andrew@lunn.ch,
f.fainelli@gmail.com, olteanv@gmail.com, luizluca@gmail.com,
davem@davemloft.net, kernel@pengutronix.de, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: dsa: realtek: fix out-of-bounds access
Date: Sat, 25 Mar 2023 02:10:17 +0000 [thread overview]
Message-ID: <167971021766.17146.5805572858718496946.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20230323103735.2331786-1-a.fatoum@pengutronix.de>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 23 Mar 2023 11:37:35 +0100 you wrote:
> The probe function sets priv->chip_data to (void *)priv + sizeof(*priv)
> with the expectation that priv has enough trailing space.
>
> However, only realtek-smi actually allocated this chip_data space.
> Do likewise in realtek-mdio to fix out-of-bounds accesses.
>
> These accesses likely went unnoticed so far, because of an (unused)
> buf[4096] member in struct realtek_priv, which caused kmalloc to
> round up the allocated buffer to a big enough size, so nothing of
> value was overwritten. With a different allocator (like in the barebox
> bootloader port of the driver) or with KASAN, the memory corruption
> becomes quickly apparent.
>
> [...]
Here is the summary with links:
- [net,v2] net: dsa: realtek: fix out-of-bounds access
https://git.kernel.org/netdev/net/c/b93eb5648693
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2023-03-25 2:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 10:37 [PATCH net v2] net: dsa: realtek: fix out-of-bounds access Ahmad Fatoum
2023-03-25 2:10 ` patchwork-bot+netdevbpf [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=167971021766.17146.5805572858718496946.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=a.fatoum@pengutronix.de \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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