From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Hangyu Hua <hbh25y@gmail•com>
Cc: justin.chen@broadcom•com, florian.fainelli@broadcom•com,
davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
pabeni@redhat•com, mw@semihalf•com, nbd@nbd•name,
john@phrozen•org, sean.wang@mediatek•com,
Mark-MC.Lee@mediatek•com, lorenzo@kernel•org,
matthias.bgg@gmail•com, angelogioacchino.delregno@collabora•com,
maxime.chevallier@bootlin•com, nelson.chang@mediatek•com,
bcm-kernel-feedback-list@broadcom•com, netdev@vger•kernel.org,
linux-kernel@vger•kernel.org,
linux-arm-kernel@lists•infradead.org,
linux-mediatek@lists•infradead.org
Subject: Re: [PATCH v2 2/3] net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc()
Date: Fri, 8 Sep 2023 09:39:46 +0100 [thread overview]
Message-ID: <ZPrd0madH5Z+Ptve@shell.armlinux.org.uk> (raw)
In-Reply-To: <20230908061950.20287-3-hbh25y@gmail.com>
On Fri, Sep 08, 2023 at 02:19:49PM +0800, Hangyu Hua wrote:
> rules is allocated in ethtool_get_rxnfc and the size is determined by
> rule_cnt from user space. So rule_cnt needs to be check before using
> rules to avoid OOB writing or NULL pointer dereference.
>
> Fixes: 90b509b39ac9 ("net: mvpp2: cls: Add Classification offload support")
> Signed-off-by: Hangyu Hua <hbh25y@gmail•com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-09-08 8:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 6:19 [PATCH v2 0/3] Fix possible OOB write when using rule_buf Hangyu Hua
2023-09-08 6:19 ` [PATCH v2 1/3] net: ethernet: bcmasp: fix possible OOB write in bcmasp_netfilt_get_all_active() Hangyu Hua
2023-09-10 14:46 ` Simon Horman
2023-09-08 6:19 ` [PATCH v2 2/3] net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc() Hangyu Hua
2023-09-08 7:11 ` Marcin Wojtas
2023-09-08 8:39 ` Russell King (Oracle) [this message]
2023-09-08 6:19 ` [PATCH v2 3/3] net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all() Hangyu Hua
2023-09-10 14:47 ` Simon Horman
2023-09-11 7:30 ` [PATCH v2 0/3] Fix possible OOB write when using rule_buf 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=ZPrd0madH5Z+Ptve@shell.armlinux.org.uk \
--to=linux@armlinux$(echo .)org.uk \
--cc=Mark-MC.Lee@mediatek$(echo .)com \
--cc=angelogioacchino.delregno@collabora$(echo .)com \
--cc=bcm-kernel-feedback-list@broadcom$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=florian.fainelli@broadcom$(echo .)com \
--cc=hbh25y@gmail$(echo .)com \
--cc=john@phrozen$(echo .)org \
--cc=justin.chen@broadcom$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=lorenzo@kernel$(echo .)org \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=maxime.chevallier@bootlin$(echo .)com \
--cc=mw@semihalf$(echo .)com \
--cc=nbd@nbd$(echo .)name \
--cc=nelson.chang@mediatek$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sean.wang@mediatek$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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