CVE-2022-49309: drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()

Published Feb 26, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

drivers: staging: rtl8723bs: Fix deadlock in rtwsurveydoneeventcallback()

There is a deadlock in rtwsurveydoneeventcallback(), which is shown below:

(Thread 1) | (Thread 2) | settimer() rtwsurveydoneeventcallback()| modtimer() spinlockbh() //(1) | (wait a time) ... | rtwscantimeouthandler() deltimersync() | spinlockbh() //(2) (wait timer to stop) | ...

We hold pmlmepriv->lock in position (1) of thread 1 and use deltimersync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtwsurveydoneeventcallback() will block forever.

This patch extracts deltimersync() from the protection of spinlockbh(), which could let timer handler to obtain the needed lock. Whats more, we change spinlockbh() in rtwscantimeouthandler() to spinlockirq(). Otherwise, spinlockbh() will also cause deadlock() in timer handler.

Affected Software

4 affected components
Linux Linux kernel<5.15.47
Linux Linux kernel>=5.16<5.17.15
Linux Linux kernel>=5.18<5.18.4
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade drivers: staging: rtl8723bs to a version that resolves this vulnerability.

    Patch Fix deadlock in rtw_surveydone_event_callback()
  2. Configuration

    Apply the kernel patch for rtl8723bs that extracts del_timer_sync() from the protection of pmlmepriv->lock to resolve the deadlock.

    rtw_surveydone_event_callback() timer handling del_timer_sync() protection / locking = Move del_timer_sync() outside the protection of pmlmepriv->lock; extract del_timer_sync() so it is not executed while holding pmlmepriv->lock
  3. Configuration

    Apply the kernel patch for rtl8723bs that changes spin_lock_bh() to spin_lock_irq() in rtw_scan_timeout_handler() to prevent the timer handler from deadlocking when obtaining the needed lock.

    rtw_scan_timeout_handler() locking spin_lock_bh()/spin_lock_irq() usage = Change spin_lock_bh() to spin_lock_irq()

Event History

Feb 26, 2025
CVE Published
via MITRE·02:10 AM
Data Sourced
via MITRE·02:10 AM
Description
Data Sourced
via NVD·07:01 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49309?

CVE-2022-49309 has a medium severity level due to the potential for deadlock in the Linux kernel.

2

How do I fix CVE-2022-49309?

To fix CVE-2022-49309, you should upgrade your Linux kernel to version 5.17.15 or above, or any version beyond 5.18.4.

3

What causes CVE-2022-49309?

CVE-2022-49309 is caused by a deadlock occurring in the rtw_surveydone_event_callback function within the Linux kernel.

4

Which Linux kernel versions are affected by CVE-2022-49309?

Linux kernel versions from 5.15 to 5.18.4 are affected by CVE-2022-49309.

5

Is there a mitigation strategy for CVE-2022-49309?

The only mitigation strategy for CVE-2022-49309 is to apply the proper upgrades that resolve the deadlock issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203