All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Pal <kuncy7@gmail.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Yongzhao Chen <yongzhao.derek@gmail.com>,
	Alexey Immoreev <luixo-public@luixo.me>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/4] net: dsa: qca8k: bound the data of a management ack frame
Date: Thu, 19 Nov 2026 14:39:08 +0100	[thread overview]
Message-ID: <20261119133908.12428-1-kuncy7@gmail.com> (raw)
In-Reply-To: <20261118104104.26684-5-kuncy7@gmail.com>

On Wed, Nov 18, 2026 at 11:41:04AM +0100, Stanislaw Pal wrote:
> +	if (data_len && !pskb_may_pull(skb, data_len))
> +		goto complete;
> +
>  	/* Make sure the seq match the requested packet */
>  	if (get_unaligned_le32(&mgmt_ethhdr->seq) == mgmt_eth_data->seq)

This is wrong: mgmt_ethhdr is taken from skb_mac_header() before the
pull, and pskb_may_pull() can move the head, so ->seq and ->mdio_data
may then be read from the old one. 3/4 takes mib_ethhdr again after
its pull; this one has to do the same. I will send v4 with that, the
rest unchanged, once v3 has been on the list for a day.

pw-bot: cr

      reply	other threads:[~2026-11-19 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 10:41 [PATCH net-next v3 0/4] net: dsa: qca8k: fix the MIB autocast and management frame handlers Stanislaw Pal
2026-11-18 10:41 ` [PATCH net-next v3 1/4] net: dsa: qca8k: read each register into its own word over MDIO Stanislaw Pal
2026-11-18 10:41 ` [PATCH net-next v3 2/4] net: dsa: qca8k: drop MIB autocast frames once the request is over Stanislaw Pal
2026-11-18 10:41 ` [PATCH net-next v3 3/4] net: dsa: qca8k: check the length of MIB autocast frames Stanislaw Pal
2026-11-18 10:41 ` [PATCH net-next v3 4/4] net: dsa: qca8k: bound the data of a management ack frame Stanislaw Pal
2026-11-19 13:39   ` Stanislaw Pal [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=20261119133908.12428-1-kuncy7@gmail.com \
    --to=kuncy7@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luixo-public@luixo.me \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=yongzhao.derek@gmail.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.