mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Doruk Tan Ozturk <doruk@0sec.ai>, linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] wifi: ath6kl: validate assoc info lengths in the WMI connect event
Date: Sat, 11 Jul 2026 07:39:19 -0700	[thread overview]
Message-ID: <779ee099-5132-4752-bdb8-354dfdc53926@oss.qualcomm.com> (raw)
In-Reply-To: <20260711071336.58324-1-doruk@0sec.ai>

On 7/11/2026 12:13 AM, Doruk Tan Ozturk wrote:
> ath6kl_wmi_connect_event_rx() only checks that the received event is at
> least sizeof(struct wmi_connect_event); it never checks that the trailing
> beacon_ie_len + assoc_req_len + assoc_resp_len fields fit within the
> received buffer. Those attacker/AP-influenced lengths then drive two
> out-of-bounds accesses:
> 
>   - The WMM information-element scan builds
>     peie = assoc_info + beacon_ie_len + assoc_req_len + assoc_resp_len
>     and walks up to it, reading past the end of the event buffer when the
>     declared lengths exceed the buffer. The walk also dereferences
>     pie[1..6] and pie[1] (for the advance) without checking they stay
>     within peie.
> 
>   - ath6kl_cfg80211_connect_event() subtracts fixed offsets from
>     assoc_req_len (-= 4) and assoc_resp_len (-= 6), both u8, with no lower
>     bound. A short assoc request/response underflows the length to ~250,
>     which cfg80211_connect_result() / cfg80211_roamed() then treat as the
>     IE length and copy out of bounds from the small assoc_info buffer,
>     disclosing adjacent slab memory to user space via nl80211.
> 
> Bound the declared IE lengths against the received buffer, bound the WMM
> element reads against peie, and clamp the assoc request/response lengths
> before the subtraction. The sibling wil6210 driver already performs the
> equivalent length check for the same WMI connect event.
> 
> Found by 0sec (https://0sec.ai) using automated source analysis; the
> missing bounds are evident from source and cross-checked against the
> sibling wil6210 driver. Compile-tested.
> 
> Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
> Cc: stable@vger.kernel.org
> Assisted-by: 0sec:claude-opus-4-8
> Signed-off-by: Doruk Tan Ozturk <doruk@0sec.ai>

Some aspects of your patch are already addressed by:
https://lore.kernel.org/all/20260421135009.348084-3-tristmd@gmail.com

So you will need to rebase once that lands.

/jeff

  reply	other threads:[~2026-07-11 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11  7:13 Doruk Tan Ozturk
2026-07-11 14:39 ` Jeff Johnson [this message]
2026-07-13 18:18   ` Doruk (0sec)
2026-07-13 19:21     ` Jeff Johnson

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=779ee099-5132-4752-bdb8-354dfdc53926@oss.qualcomm.com \
    --to=jeff.johnson@oss.qualcomm.com \
    --cc=doruk@0sec.ai \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=peddolla.reddy@oss.qualcomm.com \
    --cc=stable@vger.kernel.org \
    /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®