Re: [PATCH net-next v3 4/4] net: dsa: qca8k: bound the data of a management ack frame
From: Stanislaw Pal
Date: Thu Nov 19 2026 - 08:39:20 EST
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