mt792x: mainline NULL-deref fix 7825de3f75d1 missing from mt76 tree — downstream syncs ship the crash
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c, linux
- Domain
- networking, operating-systems
Research direction
Start with mt792x_init_acpi_sar_power() in mt792x_acpi_sar.c, then compare the tree with mainline commits 7825de3f75d1, 45f53d98cbaa, and af97bf5a7e72. Confirm that ACPI SAR initialization safely handles a missing wiphy->sar_capa without affecting probe. Done means the relevant upstream fixes are present in the mt76 tree and the MT7922/MT7925 NULL-dereference path is covered or otherwise verifiable.
Written by the indexing model from the issue text.
Description
mt792x_init_acpi_sar_power() in master still dereferences wiphy->sar_capa without a NULL check. On machines with an ACPI SAR table (MT7922 and MT7925), this crashes mt7921_init_work at probe, and the Wi-Fi interface never comes up:
BUG: kernel NULL pointer dereference, address: 0000000000000004
Workqueue: events mt7921_init_work [mt7921_common]
RIP: 0010:mt792x_init_acpi_sar_power+0x34/0x210 [mt792x_lib]
mt7921_set_tx_sar_pwr
__mt7921_mcu_regd_update
mt7921_regd_update
mt7921_regd_init
mt7921_load_clc
mt7921_run_firmware
mt7921e_mcu_init
mt7921_init_work
Mainline fixed this in 7825de3f75d1 ("wifi: mt76: mt792x: fix NULL dereference in ACPI SAR init during probe", v7.3-rc3). Linus applied it straight from the list, so it never went through this tree:
https://git.kernel.org/torvalds/c/7825de3f75d184612d77655669a04ea0da252c17
Because of this, downstream kernels that sync mt76 from here get the regression without the fix. Pop!_OS shipped it in linux-system76 7.2.6 ("Sync mt76 module entirely from openwrt"). On my mother's ASUS Zenbook 14 UM3406KA (MT7922 14c3:0616, subsystem 105b:e0de), the result is no Wi-Fi plus hangs on shutdown and suspend.
Could you pull 7825de3f75d1 into the mt76 tree? 45f53d98cbaa and af97bf5a7e72 from mainline touch mt792x_acpi_sar.c as well and also look missing.
- Dominant language
- C
- Stars
- 895
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openwrt/mt76
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
MT76xx - WLAN leds doesn't work with the testing kernelMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
mt7925: Netgear A8000 (0846:9072) reports hw_path without WF0_5G, so 5 GHz band is never registeredOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
SPIDevice selects an active-high device as soon as it is createdPossibly taken @mikeysklar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
adafruit/circuitpython#11869 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
gnif/LookingGlass#1352 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100