All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Haerter <ah@foundata.com>
To: cnfourt@gmail.com
Cc: angelogioacchino.delregno@collabora.com, leon.yen@mediatek.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-wireless@vger.kernel.org, lorenzo@kernel.org,
	lucid_duck@justthetip.ca, matthias.bgg@gmail.com,
	mingyen.hsieh@mediatek.com, nbd@nbd.name, ryder.lee@mediatek.com,
	sean.wang@mediatek.com, shayne.chen@mediatek.com,
	stable@vger.kernel.org, yu-ching.liu@mediatek.com
Subject: Re: [PATCH] wifi: mt76: mt7925: fix NULL dereference in CSA worker
Date: Fri,  6 Nov 2026 06:57:09 +0100	[thread overview]
Message-ID: <20261106055710.222567-1-ah@foundata.com> (raw)
In-Reply-To: <20261025140123.12056-1-cnfourt@gmail.com>

On Sun, Oct 25, 2026 at 10:01:18PM +0800, Gris Ge wrote:
> Reproduced the panic by injecting CSA-less "abort" beacon, works well
> after patched.

I hit the same oops in normal use, with no injected frames, on a
ThinkPad X13 Gen 6 (MT7925, 14c3:7925) running Fedora's
7.2.14-200.fc44.x86_64, not tainted:

  BUG: kernel NULL pointer dereference, address: 0000000000000000
  Workqueue: phy0 mt7925_csa_work [mt7925_common]
  RIP: 0010:mt7925_csa_work+0x83/0x160 [mt7925_common]
  RAX: 0000000000000000 RBX: ffff8eeb5bbb3910 RCX: 0000000000000fa0

The code bytes decode to the dev->new_ctx load followed by the read of
def.chan for mt7925_set_roc(), and RCX holds the duration of 4000.

The access point announced a channel switch just after a roam:

  10:58:02.90  associated with the new BSS on 5180 MHz
  10:58:04.05  CTRL-EVENT-STARTED-CHANNEL-SWITCH freq=5180 (80 MHz)
  10:58:04.47  oops

It has happened once. Two earlier channel switches on this machine
completed normally, and the log does not show what tore the context
down.

The impact MAY be worth a line in the changelog. The oops lands between
mt792x_mutex_acquire() and the release, so dev->mt76.mutex stays held
for good. WiFi did not come back, and at shutdown wpa_supplicant,
NetworkManager, avahi-daemon and systemd-resolved all survived SIGKILL.
The machine needed a forced power-off, so the stable tag looks right to
me.

I read the patch against master and v7.2.14. The chanctx hunks apply to
v7.2.14 with an offset and mt7925_csa_work() is identical there. I see
no new lock ordering problem.

I have no reproducer, so I cannot offer a Tested-by.

Thanks,
Andreas

-- 
foundata GmbH
Steinhäuserstr. 20
76135 Karlsruhe


Web: https://foundata.com
Sitz der Gesellschaft: Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 714807
Geschäftsführung: Andreas Haerter
USt-IdNr.: DE284122682


  reply	other threads:[~2026-11-06  5:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 14:01 [PATCH] wifi: mt76: mt7925: fix NULL dereference in CSA worker Gris Ge
2026-11-06  5:57 ` Andreas Haerter [this message]
2026-12-02 10:34   ` Mattia Rombi
2026-12-02 11:40     ` Gris Ge

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=20261106055710.222567-1-ah@foundata.com \
    --to=ah@foundata.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=cnfourt@gmail.com \
    --cc=leon.yen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lucid_duck@justthetip.ca \
    --cc=matthias.bgg@gmail.com \
    --cc=mingyen.hsieh@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=stable@vger.kernel.org \
    --cc=yu-ching.liu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.