Re: [PATCH v3] wifi: cfg80211: Fix uninitialized header access in cfg80211_classify8021d
From: Johannes Berg
Date: Wed Nov 19 2025 - 04:09:18 EST
On Tue, 2025-11-18 at 20:35 +0530, Ranganath V N wrote:
>
> switch (skb->protocol) {
> case htons(ETH_P_IP):
> + struct iphdr iph, *ip;
> +
> + ip = skb_header_pointer(skb, sizeof(struct ethhdr),
> + sizeof(*ip), &iph);
> + if (!ip)
> + return 0;
> +
> dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
If you pull it out that way, seems you should also _use_ it?
johannes