mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Aleksander Jan Bajkowski <olek2@wp.pl>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	shannon.nelson@amd.com, sd@queasysnail.net,
	u.kleine-koenig@pengutronix.de, john@phrozen.org,
	ralf@linux-mips.org, ralph.hempel@lantiq.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: ethernet: lantiq_etop: fix memory disclosure
Date: Tue, 16 Jul 2024 11:46:08 +0200	[thread overview]
Message-ID: <b5a2f43e-790f-475c-bb63-539af91513ac@redhat.com> (raw)
In-Reply-To: <20240713223357.2911169-1-olek2@wp.pl>

On 7/14/24 00:33, Aleksander Jan Bajkowski wrote:
> diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
> index 0b9982804370..196715d9ea43 100644
> --- a/drivers/net/ethernet/lantiq_etop.c
> +++ b/drivers/net/ethernet/lantiq_etop.c
> @@ -478,11 +478,11 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
>   	struct ltq_etop_priv *priv = netdev_priv(dev);
>   	struct ltq_etop_chan *ch = &priv->ch[(queue << 1) | 1];
>   	struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
> -	int len;
>   	unsigned long flags;
>   	u32 byte_offset;
>   
> -	len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
> +	if (skb_put_padto(skb, ETH_ZLEN))

You may want to increment tx drop stats here.

Thanks,

Paolo


  reply	other threads:[~2024-07-16  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-13 22:33 Aleksander Jan Bajkowski
2024-07-16  9:46 ` Paolo Abeni [this message]
2024-07-16 19:27   ` Aleksander Jan Bajkowski
2024-07-25 19:47     ` Aleksander Jan Bajkowski

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=b5a2f43e-790f-475c-bb63-539af91513ac@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olek2@wp.pl \
    --cc=ralf@linux-mips.org \
    --cc=ralph.hempel@lantiq.com \
    --cc=sd@queasysnail.net \
    --cc=shannon.nelson@amd.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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

all inboxes | Powered by JetHome®