From: Johannes Berg <johannes@sipsolutions.net>
To: Ranganath V N <vnranganath.20@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
khalid@kernel.org,
syzbot+878ddc3962f792e9af59@syzkaller.appspotmail.com
Subject: Re: [PATCH v4] wifi: cfg80211: Fix uninitialized header access in cfg80211_classify8021d
Date: Tue, 16 Dec 2025 10:28:36 +0100 [thread overview]
Message-ID: <7723c9b1b370f9f23f70285560dad9362e9ab37a.camel@sipsolutions.net> (raw)
In-Reply-To: <20251203175418.6623-1-vnranganath.20@gmail.com> (sfid-20251203_185432_410465_2AE88914)
On Wed, 2025-12-03 at 23:24 +0530, Ranganath V N wrote:
>
> +++ b/net/wireless/util.c
> @@ -962,12 +962,28 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
> }
>
> switch (skb->protocol) {
> - case htons(ETH_P_IP):
> - dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
> + case htons(ETH_P_IP): {
> + struct iphdr iph, *ip;
> +
> + ip = skb_header_pointer(skb, sizeof(struct ethhdr),
> + sizeof(*ip), &iph);
The sizeof(struct ethhdr) is probably a *correct* assumption, but
wouldn't skb->network_header make more sense?
Please try to understand the code in question before reposting this
patch *again*, I'm not interested in coding by remote-control.
johannes
prev parent reply other threads:[~2025-12-16 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 17:54 Ranganath V N
2025-12-16 9:28 ` Johannes Berg [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=7723c9b1b370f9f23f70285560dad9362e9ab37a.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=david.hunter.linux@gmail.com \
--cc=khalid@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+878ddc3962f792e9af59@syzkaller.appspotmail.com \
--cc=vnranganath.20@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 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®