From: sashiko-bot@kernel.org
To: "Aldo Ariel Panzardo" <qwe.aldo@gmail.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH] net: fec: reject oversized fragments before bounce-buffer memcpy
Date: Thu, 24 Sep 2026 14:12:18 +0000 [thread overview]
Message-ID: <20260924141218.B22631F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923141154.2415545-1-qwe.aldo@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] net: fec: undefined label 'release' causes build failure
--
commit 6a879b984d90eaab6d6db0210d5b4b63b7aaceff
Author: Aldo Ariel Panzardo <qwe.aldo@gmail.com>
net: fec: reject oversized fragments before bounce-buffer memcpy
This commit adds bounds checks before copying transmit data into the per-ring
bounce buffer to prevent memory corruption when fragment sizes exceed the
buffer capacity.
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 794ec427b0ee6..861498448fe36 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
[ ... ]
> @@ -634,6 +636,8 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
> index = fec_enet_get_bd_index(bdp, &txq->bd);
> if (((unsigned long) bufaddr) & fep->tx_align ||
> fep->quirks & FEC_QUIRK_SWAP_FRAME) {
> + if (buflen > FEC_ENET_TX_FRSIZE)
> + goto release;
[Severity: Low]
Does this code introduce a build failure? The label release appears to be
undefined in fec_enet_txq_submit_skb(), which causes compilation to fail
with an undefined label error.
> memcpy(txq->tx_bounce[index], skb->data, buflen);
> bufaddr = txq->tx_bounce[index];
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923141154.2415545-1-qwe.aldo@gmail.com?part=1
prev parent reply other threads:[~2026-09-24 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 14:11 [PATCH] net: fec: reject oversized fragments before bounce-buffer memcpy Aldo Ariel Panzardo
2026-09-23 18:59 ` Andrew Lunn
2026-09-24 14:12 ` sashiko-bot [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=20260924141218.B22631F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=qwe.aldo@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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