Netdev List
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Tianchu Chen <tianchu.chen@linux.dev>
Cc: francesco@dolcini.it, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] wifi: mwifiex: bound SDIO fw dump count by memory table size
Date: Fri, 25 Sep 2026 15:34:59 -0700	[thread overview]
Message-ID: <arb3E_cVtzMC5eKj@google.com> (raw)
In-Reply-To: <7d886d74276c05eeb1b1698e31b72a5aed98612a@linux.dev>

On Fri, Sep 04, 2026 at 12:57:55PM +0000, Tianchu Chen wrote:
> From: Tianchu Chen <flynnnchen@tencent.com>
> 
> mwifiex_sdio_fw_dump() reads the number of memory regions (dump_num) from 
> a device register and uses it to index the static 15-entry
> mem_type_mapping_tbl[] without any bounds check. A bogus device can
> report a dump_num larger than the table, making each loop iteration
> store a vmalloc pointer and a device-controlled size past the end
> of the table into adjacent .data (up to ~5.7KB when dump_num is 255).
> 
> The dump path runs after command timeouts or firmware crashes, so a
> bogus device can first force an error to trigger the dump and
> then report a bogus dump_num.
> 
> Aborting the dump only loses the firmware snapshot; the card reset 
> that follows is unaffected, so error recovery still completes.
> 
> Discovered by Atuin - Automated Vulnerability Discovery Engine.
> 
> Fixes: 54881c6b37c8d ("mwifiex: add firmware dump feature for SDIO")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Tianchu Chen <flynnnchen@tencent.com>

I'm not sure if we're in the business of distrusting SDIO registers, but
sure?

Acked-by: Brian Norris <briannorris@chromium.org>

We also read this same register a bit later and use it for computing
potentially-enormous buffers to allocate and fill. Dunno if we consider
OOM a potential vulnerability (or infinite loop / DoS, or ...).

      reply	other threads:[~2026-09-25 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 12:57 [PATCH] wifi: mwifiex: bound SDIO fw dump count by memory table size Tianchu Chen
2026-09-25 22:34 ` Brian Norris [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=arb3E_cVtzMC5eKj@google.com \
    --to=briannorris@chromium.org \
    --cc=francesco@dolcini.it \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tianchu.chen@linux.dev \
    /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