From: Johannes Berg <johannes@sipsolutions.net>
To: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+cc867e537e4bd36f69bb@syzkaller.appspotmail.com
Subject: Re: [PATCH] wifi: cfg80211: validate IEs in cfg80211_wext_siwgenie()
Date: Fri, 10 Jul 2026 08:39:41 +0200 [thread overview]
Message-ID: <6be574903752d95ae7125461c38cc30b8a641d24.camel@sipsolutions.net> (raw)
In-Reply-To: <20260710024637.16729-1-kartikey406@gmail.com> (sfid-20260710_044649_032516_DA33F864)
On Fri, 2026-07-10 at 08:16 +0530, Deepanshu Kartikey wrote:
>
> +bool cfg80211_validate_ies(const u8 *ies, size_t ies_len)
> +{
> + size_t pos = 0;
> +
> + while (pos < ies_len) {
> + if (pos + 2 > ies_len)
> + return false;
> + if (pos + 2 + ies[pos + 1] > ies_len)
> + return false;
> + pos += 2 + ies[pos + 1];
> + }
> +
> + return true;
> +}
> +EXPORT_SYMBOL(cfg80211_validate_ies);
I don't believe you'd need to even export this, and we also already have
validate_ie_attr() in nl80211, written in a better way too...
johannes
next prev parent reply other threads:[~2026-07-10 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 2:46 Deepanshu Kartikey
2026-07-10 6:39 ` Johannes Berg [this message]
2026-07-10 15:31 ` Deepanshu Kartikey
2026-07-22 15:21 ` Johannes Berg
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=6be574903752d95ae7125461c38cc30b8a641d24.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=kartikey406@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=syzbot+cc867e537e4bd36f69bb@syzkaller.appspotmail.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®