Skip to content

wifi: ath11k: fix NULL pointer dereference in ath11k_hal_srng_access_…#706

Open
GaoleZhangHaha wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
GaoleZhangHaha:qcom-6.18.y
Open

wifi: ath11k: fix NULL pointer dereference in ath11k_hal_srng_access_…#706
GaoleZhangHaha wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
GaoleZhangHaha:qcom-6.18.y

Conversation

@GaoleZhangHaha

@GaoleZhangHaha GaoleZhangHaha commented Jun 12, 2026

Copy link
Copy Markdown

…begin

In ATH11K_QMI_EVENT_FW_READY, ATH11K_FLAG_REGISTERED is set unconditionally even when ath11k_core_qmi_firmware_ready() fails. This leaves the driver in an inconsistent state where initialization is considered complete although the firmware ready handling did not finish successfully. During the subsequent SSR, the driver enters the restart path based on this incorrect state and dereferences uninitialized srng members, resulting in a NULL pointer dereference.

Call trace:
ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] (P)
ath11k_ce_cleanup_pipes+0x17c/0x180 [ath11k]
ath11k_core_restart+0x40/0x168 [ath11k]

Fix this by:

  • skipping firmware_ready if ATH11K_FLAG_REGISTERED is already set
  • setting ATH11K_FLAG_REGISTERED only when firmware_ready succeeds
  • setting ATH11K_FLAG_QMI_FAIL and aborting the FW_READY handling on error

CRs-Fixed: 4516283

…begin

In ATH11K_QMI_EVENT_FW_READY, ATH11K_FLAG_REGISTERED is set
unconditionally even when ath11k_core_qmi_firmware_ready() fails.
This leaves the driver in an inconsistent state where
initialization is considered complete although the firmware ready
handling did not finish successfully. During the subsequent SSR,
the driver enters the restart path based on this incorrect state
and dereferences uninitialized srng members, resulting in a NULL
pointer dereference.

Call trace:
  ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] (P)
  ath11k_ce_cleanup_pipes+0x17c/0x180 [ath11k]
  ath11k_core_restart+0x40/0x168 [ath11k]

Fix this by:
- skipping firmware_ready if ATH11K_FLAG_REGISTERED is already set
- setting ATH11K_FLAG_REGISTERED only when firmware_ready succeeds
- setting ATH11K_FLAG_QMI_FAIL and aborting the FW_READY handling
on error

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1

Fixes: 6fe62a8 ("wifi: ath11k: Add cold boot calibration support on WCN6750")
Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4516283 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4516283

Please ensure the CR has a change task associated with at least one of the entities for this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant