Bug 2537645

Summary: linux-firmware-20260916 breaks mt7921/mt7922 WiFi - UBSAN array-index-out-of-bounds in mcu.c:471
Product: [Fedora] Fedora Reporter: empire.of.the.void44
Component: kernelAssignee: Justin M. Forbes <jforbes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 44CC: acaringi, adscvr, airlied, dwmw2, hans, hpa, jforbes, jwboyer, kernel-maint, linville, masami256, mchehab, nickolasjcarr, pbrobinson, ptalbert, steved, suraj.ghimire7
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-7.2.7-300.fc45 kernel-7.2.7-200.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-09-23 00:18:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description empire.of.the.void44 2026-09-21 20:34:46 UTC
Description of problem:
After updating linux-firmware from 20260309 to 20260916, the mt7921e WiFi
driver crashes on every boot with a UBSAN array-index-out-of-bounds error,
causing the wireless interface to fail to initialize properly. This leads
to repeated system instability and, in my case, unrelated services (Docker
containers) failing to start cleanly due to the resulting reboot cycles.

Version-Release number of selected component (if applicable):
linux-firmware-20260916-1.fc44.noarch
kernel-7.2.5-200.fc44.x86_64

How reproducible:
Always, on every boot with linux-firmware-20260916 installed.

Steps to Reproduce:
1. Install/update to linux-firmware-20260916-1.fc44 on a system with an
   MT7921/MT7922 wireless card
2. Boot the system
3. Check dmesg / journalctl for kernel errors

Actual results:
kernel: UBSAN: array-index-out-of-bounds in
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:471:15
kernel: index 3 is out of range for type 'void *[3]'

Expected results:
WiFi card initializes without triggering a kernel-level array bounds
violation.

Additional info:
This appears to be caused by the linux-firmware 20260916 package shipping
an updated CLC (Country Location Control) firmware blob that includes a
new section with idx=3, while the in-kernel mt7921 driver only allocates
space for 3 entries (idx 0-2, MT792x_CLC_MAX_NUM). The driver does not
validate the idx value read from the firmware blob before using it to
index phy->clc[], resulting in an out-of-bounds array access.

This exact issue was already identified and fixed upstream:

  Patch: "wifi: mt76: mt7921: validate CLC indices"
  Author: Zhao Li
  Date: 2026-07-31
  Link: https://git.kernel.org/linus/9679ca7326e52282cc923c4d71d81c999cb6cd55

A related fix for the mt7925 variant was merged earlier:
  "wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for clc"
  https://github.com/torvalds/linux/commit/9679ca7326e52282cc923c4d71d81c999cb6cd55

Workaround:
Downgrading to linux-firmware-20260309-1.fc44 (the version prior to the
CLC firmware update) resolves the issue completely - no more UBSAN errors
on boot, WiFi initializes cleanly.

  sudo dnf downgrade linux-firmware-20260309-1.fc44 --allowerasing
  sudo dnf versionlock add linux-firmware-20260309-1.fc44

Requesting either:
1. The mt7921 kernel driver in the Fedora kernel package be updated to
   include the upstream CLC index validation fix, or
2. The linux-firmware package be reverted/patched until the kernel-side
   fix is in place, to avoid shipping a firmware/driver combination known
   to crash on boot.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.1. Install/update to linux-firmware-20260916-1.fc44 on a system with an MT7921/MT7922 wireless card
2. Boot the system
3. Check dmesg / journalctl for kernel errors
Actual Results:
kernel: UBSAN: array-index-out-of-bounds in drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:471:15
kernel: index 3 is out of range for type 'void *[3]'

Expected Results:
WiFi card initializes without triggering a kernel-level array bounds violation.

Additional Information:
Version: linux-firmware-20260916-1.fc44.noarch
Kernel: kernel-7.2.5-200.fc44.x86_64

Root cause:
The linux-firmware 20260916 package ships an updated CLC (Country Location
Control) firmware blob with a new section (idx=3), while the in-kernel
mt7921 driver only allocates space for 3 entries (idx 0-2,
MT792x_CLC_MAX_NUM). The driver does not validate the idx value before
using it to index phy->clc[], causing an out-of-bounds array access.

This exact issue was already fixed upstream:
  Patch: "wifi: mt76: mt7921: validate CLC indices"
  Author: Zhao Li
  Date: 2026-07-31
  Link: https://git.kernel.org/linus/9679ca7326e52282cc923c4d71d81c999cb6cd55

Workaround:
Downgrading to linux-firmware-20260309-1.fc44 resolves the issue completely.

  sudo dnf downgrade linux-firmware-20260309-1.fc44 --allowerasing
  sudo dnf versionlock add linux-firmware-20260309-1.fc44

Comment 1 Peter Robinson 2026-09-22 08:20:43 UTC
It's a kernel problem for not validating the firmware, even if the firmware may have been the cause, as you indicate there's a kernel fix for it, so let's move it to the location where the fix will land.

Comment 2 Peter Robinson 2026-09-22 08:22:21 UTC
> This exact issue was already identified and fixed upstream:
> 
>   Patch: "wifi: mt76: mt7921: validate CLC indices"
>   Author: Zhao Li
>   Date: 2026-07-31
>   Link: https://git.kernel.org/linus/9679ca7326e52282cc923c4d71d81c999cb6cd55
> 
> A related fix for the mt7925 variant was merged earlier:
>   "wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for
> clc"
>  
> https://github.com/torvalds/linux/commit/
> 9679ca7326e52282cc923c4d71d81c999cb6cd55

They are the same commit.

Comment 3 Peter Robinson 2026-09-22 09:46:04 UTC
Looks like it's fixed in 7.2.7:

Laxman Acharya Padhya (4):
      wifi: mt76: mt7921: validate CLC firmware records
      wifi: mt76: mt7921: skip unknown CLC firmware records

Comment 4 Fedora Update System 2026-09-22 09:46:51 UTC
FEDORA-2026-ca91e91bf0 (kernel-7.2.7-200.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ca91e91bf0

Comment 5 Fedora Update System 2026-09-22 09:47:17 UTC
FEDORA-2026-4c098c462e (kernel-7.2.7-300.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-4c098c462e

Comment 6 Fedora Update System 2026-09-23 00:18:30 UTC
FEDORA-2026-4c098c462e (kernel-7.2.7-300.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2026-09-23 01:10:33 UTC
FEDORA-2026-ca91e91bf0 (kernel-7.2.7-200.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.