From: Jakub Kicinski <kuba@kernel.org>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
kernel@pengutronix.de, "Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: dsa: realtek: fix out-of-bounds access
Date: Wed, 22 Mar 2023 11:21:51 -0700 [thread overview]
Message-ID: <20230322112151.04f12a8e@kernel.org> (raw)
In-Reply-To: <e47793af-b409-5e88-c74c-73e76f5e11d1@pengutronix.de>
On Wed, 22 Mar 2023 16:51:00 +0100 Ahmad Fatoum wrote:
> On 17.03.23 05:07, Jakub Kicinski wrote:
> > On Wed, 15 Mar 2023 14:09:15 +0100 Ahmad Fatoum wrote:
> >> - priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
> >> + priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv) + var->chip_data_sz, GFP_KERNEL);
> >
> > size_add() ?
> > Otherwise some static checker is going to soon send us a patch saying
> > this can overflow. Let's save ourselves the hassle.
>
> The exact same line is already in realtek-smi. Would you prefer I send
> a follow-up patch for net-next which switches over both files to size_add
> or should I send a v2?
We can leave the existing code be, but use the helper in the new code
for v2
prev parent reply other threads:[~2023-03-22 18:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 13:09 [PATCH net 1/2] net: dsa: realtek: fix out-of-bounds access Ahmad Fatoum
2023-03-15 13:09 ` [PATCH net 2/2] net: dsa: realtek: fix missing new lines in error messages Ahmad Fatoum
2023-03-15 13:16 ` Linus Walleij
2023-03-15 13:21 ` Alvin Šipraga
2023-03-15 20:22 ` Florian Fainelli
2023-03-17 4:05 ` Jakub Kicinski
2023-03-22 15:47 ` Ahmad Fatoum
2023-03-15 13:15 ` [PATCH net 1/2] net: dsa: realtek: fix out-of-bounds access Linus Walleij
2023-03-15 15:34 ` Ahmad Fatoum
2023-03-15 13:21 ` Alvin Šipraga
2023-03-15 13:30 ` Andrew Lunn
2023-03-15 13:35 ` Ahmad Fatoum
2023-03-15 13:45 ` Andrew Lunn
2023-03-15 20:22 ` Florian Fainelli
2023-03-16 17:41 ` Luiz Angelo Daros de Luca
2023-03-17 4:07 ` Jakub Kicinski
2023-03-22 15:51 ` Ahmad Fatoum
2023-03-22 18:21 ` Jakub Kicinski [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=20230322112151.04f12a8e@kernel.org \
--to=kuba@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=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 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.