Description
In the Linux kernel, the following vulnerability has been resolved:
wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion
The rtwdev->scanning flag isn't protected by mutex originally, so
cancel_hw_scan can pass the condition, but suddenly hw_scan completion
unset the flag and calls ieee80211_scan_completed() that will free
local->hw_scan_req. Then, cancel_hw_scan raises null-ptr-deref and
use-after-free. Fix it by moving the check condition to where
protected by mutex.
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 2 PID: 6922 Comm: kworker/2:2 Tainted: G OE
Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB6WW (2.76 ) 09/10/2019
Workqueue: events cfg80211_conn_work [cfg80211]
RIP: 0010:rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core]
Code: 00 45 89 6c 24 1c 0f 85 23 01 00 00 48 8b 85 20 ff ff ff 48 8d
RSP: 0018:ffff88811fd9f068 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff88811fd9f258 RCX: 0000000000000001
RDX: 0000000000000011 RSI: 0000000000000001 RDI: 0000000000000089
RBP: ffff88811fd9f170 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88811fd9f108 R11: 0000000000000000 R12: ffff88810e47f960
R13: 0000000000000000 R14: 000000000000ffff R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8881d6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007531dfca55b0 CR3: 00000001be296004 CR4: 00000000001706e0
Call Trace:
<TASK>
? show_regs+0x61/0x73
? __die_body+0x20/0x73
? die_addr+0x4f/0x7b
? exc_general_protection+0x191/0x1db
? asm_exc_general_protection+0x27/0x30
? rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core]
? rtw89_fw_h2c_scan_offload_be+0x458/0x13c3 [rtw89_core]
? __pfx_rtw89_fw_h2c_scan_offload_be+0x10/0x10 [rtw89_core]
? do_raw_spin_lock+0x75/0xdb
? __pfx_do_raw_spin_lock+0x10/0x10
rtw89_hw_scan_offload+0xb5e/0xbf7 [rtw89_core]
? _raw_spin_unlock+0xe/0x24
? __mutex_lock.constprop.0+0x40c/0x471
? __pfx_rtw89_hw_scan_offload+0x10/0x10 [rtw89_core]
? __mutex_lock_slowpath+0x13/0x1f
? mutex_lock+0xa2/0xdc
? __pfx_mutex_lock+0x10/0x10
rtw89_hw_scan_abort+0x58/0xb7 [rtw89_core]
rtw89_ops_cancel_hw_scan+0x120/0x13b [rtw89_core]
ieee80211_scan_cancel+0x468/0x4d0 [mac80211]
ieee80211_prep_connection+0x858/0x899 [mac80211]
ieee80211_mgd_auth+0xbea/0xdde [mac80211]
? __pfx_ieee80211_mgd_auth+0x10/0x10 [mac80211]
? cfg80211_find_elem+0x15/0x29 [cfg80211]
? is_bss+0x1b7/0x1d7 [cfg80211]
ieee80211_auth+0x18/0x27 [mac80211]
cfg80211_mlme_auth+0x3bb/0x3e7 [cfg80211]
cfg80211_conn_do_work+0x410/0xb81 [cfg80211]
? __pfx_cfg80211_conn_do_work+0x10/0x10 [cfg80211]
? __kasan_check_read+0x11/0x1f
? psi_group_change+0x8bc/0x944
? __kasan_check_write+0x14/0x22
? mutex_lock+0x8e/0xdc
? __pfx_mutex_lock+0x10/0x10
? __pfx___radix_tree_lookup+0x10/0x10
cfg80211_conn_work+0x245/0x34d [cfg80211]
? __pfx_cfg80211_conn_work+0x10/0x10 [cfg80211]
? update_cfs_rq_load_avg+0x3bc/0x3d7
? sched_clock_noinstr+0x9/0x1a
? sched_clock+0x10/0x24
? sched_clock_cpu+0x7e/0x42e
? newidle_balance+0x796/0x937
? __pfx_sched_clock_cpu+0x10/0x10
? __pfx_newidle_balance+0x10/0x10
? __kasan_check_read+0x11/0x1f
? psi_group_change+0x8bc/0x944
? _raw_spin_unlock+0xe/0x24
? raw_spin_rq_unlock+0x47/0x54
? raw_spin_rq_unlock_irq+0x9/0x1f
? finish_task_switch.isra.0+0x347/0x586
? __schedule+0x27bf/0x2892
? mutex_unlock+0x80/0xd0
? do_raw_spin_lock+0x75/0xdb
? __pfx___schedule+0x10/0x10
process_scheduled_works+0x58c/0x821
worker_thread+0x4c7/0x586
? __kasan_check_read+0x11/0x1f
kthread+0x285/0x294
? __pfx_worker_thread+0x10/0x10
? __pfx_kthread+0x10/0x10
ret_from_fork+0x29/0x6f
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.18 | 6.1.191 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.12.13-1 | — |
| Debian 13 | linux | 6.12.13-1 | — |
| Debian 12 | linux | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 24.04 LTS | linux-bluefield | 6.8.0-1013.17 | — |
| Ubuntu 24.04 LTS | linux | 6.8.0-88.89 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1043.45 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1044.50 | USN-7935-1 |
| Ubuntu 24.04 LTS | linux-azure-fde | 6.8.0-1046.53 | — |
| Ubuntu 24.04 LTS | linux-azure-nvidia | 6.8.0-1029.32 | USN-7940-2 |
| Ubuntu 24.04 LTS | linux-gcp | 6.8.0-1044.47 | USN-7889-4 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1040.45 | USN-7889-4 |
| Ubuntu 24.04 LTS | linux-gkeop | 6.8.0-1027.30 | USN-7889-4 |
| Ubuntu 24.04 LTS | linux-ibm | 6.8.0-1041.41 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-intel +10 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-lowlatency | 6.8.0-88.89.1 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-nvidia | 6.8.0-1043.46 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1043.46.1 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-nvidia-tegra | 6.8.0-1013.13 | — |
| Ubuntu 24.04 LTS | linux-oracle | 6.8.0-1040.41 | USN-7889-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1043.47 | USN-7889-7 |
| Ubuntu 24.04 LTS | linux-xilinx | 6.8.0-1020.21 | USN-7889-7 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1043.45~22.04.1 | USN-7889-1 |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1044.50~22.04.1 | USN-7935-1 |
| Ubuntu 22.04 LTS | linux-azure-fde-6.8 | 6.8.0-1046.53~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-gcp-6.8 | 6.8.0-1044.47~22.04.1 | USN-7889-4 |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-88.89~22.04.2 | USN-7889-6 |
| Ubuntu 22.04 LTS | linux-ibm-6.8 | 6.8.0-1041.41~22.04.1 | USN-7889-5 |
| Ubuntu 22.04 LTS | linux-lowlatency-hwe-6.8 | 6.8.0-88.89.1~22.04.1 | USN-7889-1 |
| Ubuntu 22.04 LTS | linux-nvidia-6.8 | 6.8.0-1043.46~22.04.1 | USN-7889-1 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1040.41~22.04.1 | USN-7889-6 |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 | 6.8.0-88.89~22.04.1 | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2034.35 | USN-7889-7 |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1038.39 | USN-7889-3 |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime-6.8 | 6.8.1-1038.39~22.04.1 | USN-7889-3 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-aws-fips | 6.8.0-1043.45+fips1 | USN-7889-2 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-azure-fips | 6.8.0-1044.50+fips1 | USN-7940-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-fips | 6.8.0-88.89+fips1 | USN-7889-2 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-gcp-fips | 6.8.0-1044.47+fips1 | USN-7889-2 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | rv +75 | 5.14.0-611.5.1.el9_7 | RHSA-2025:20518 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | rv +73 | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 9 | kernel | 5.14.0-611.5.1.el9_7 | RLSA-2025:20518 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +6 | 6.4.0-150700.53.3.1 | SUSE-SU-2025:01951-1 |
| SLES 15 SP7 | kernel-azure +2 | 6.4.0-150700.20.3.1 | SUSE-SU-2025:01967-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.3.1.150700.17.2.1 | SUSE-SU-2025:01951-1 |
| SLES 15 SP6 | kernel-64kb +6 | 6.4.0-150600.23.50.1 | SUSE-SU-2025:01614-1 |
| SLES 15 SP6 | kernel-azure +2 | 6.4.0-150600.8.37.1 | SUSE-SU-2025:01707-1 |
| SLES 15 SP6 | kernel-coco +3 | 6.4.0-15061.21.coco15sp6.1 | SUSE-SU-2025:01919-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.50.1.150600.12.22.1 | SUSE-SU-2025:01614-1 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Micro 6.1 | kernel-default-base | 6.4.0-28.1.21.6 | SUSE-SU-2025:20270-1 |
| SLE Micro 6.1 | kernel-livepatch-MICRO-6-0-RT_Update_7 | 1-1.3 | SUSE-SU-2025:20283-1 |
| SLE Micro 6.1 | kernel-livepatch-MICRO-6-0_Update_6 | 1-3.1 | SUSE-SU-2025:20270-1 |
| SLE Micro 6.1 | kernel-rt +1 | 6.4.0-30.1 | SUSE-SU-2025:20283-1 |
| SLE Micro 6.1 | kernel-source +2 | 6.4.0-28.1 | SUSE-SU-2025:20270-1 |
| SLE Micro 6.0 | kernel-default-base | 6.4.0-28.1.21.6 | SUSE-SU-2025:20192-1 |
| SLE Micro 6.0 | kernel-livepatch-MICRO-6-0-RT_Update_7 | 1-1.3 | SUSE-SU-2025:20206-1 |
| SLE Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_6 | 1-3.1 | SUSE-SU-2025:20192-1 |
| SLE Micro 6.0 | kernel-rt +1 | 6.4.0-30.1 | SUSE-SU-2025:20206-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-28.1 | SUSE-SU-2025:20192-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.3.1 | SUSE-SU-2025:01951-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_1 | 1-150700.15.3.1 | SUSE-SU-2025:01951-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.50.1 | SUSE-SU-2025:01614-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_11 | 1-150600.1.3.2 | SUSE-SU-2025:01964-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_11 | 1-150600.13.3.1 | SUSE-SU-2025:01614-1 |
| SUSE Real Time Module 15 SP6 | kernel-rt +3 | 6.4.0-150600.10.39.1 | SUSE-SU-2025:01964-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.6 | dtb-aarch64 +10 | 6.4.0-150600.23.50.1 | SUSE-SU-2025:01614-1 |
| openSUSE Leap 15.6 | kernel-azure +2 | 6.4.0-150600.8.37.1 | SUSE-SU-2025:01707-1 |
| openSUSE Leap 15.6 | kernel-default-base | 6.4.0-150600.23.50.1.150600.12.22.1 | SUSE-SU-2025:01614-1 |
| openSUSE Leap 15.6 | kernel-rt +3 | 6.4.0-150600.10.39.1 | SUSE-SU-2025:01964-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | kernel-uek +34 | 6.12.0-101.33.4.3.el10uek | ELSA-2025-20530, ELSA-2025-20480 |
Advisories 27
- WID-SEC-2025-0453 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 11, 2026
- USN-7940-2 linux-azure-nvidia vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7940-1 linux-azure-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7935-1 linux-azure, linux-azure-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-1 linux, linux-aws, linux-aws-6.8, linux-ibm, linux-lowlatency, linux-lowlatency-hwe-6.8, linux-nvidia, linux-nvidia-6.8, linux-nvidia-lowlatency, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-7 linux-raspi, linux-raspi-realtime, linux-xilinx vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-4 linux-gcp, linux-gcp-6.8, linux-gke, linux-gkeop vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-5 linux-ibm-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-6 linux-hwe-6.8, linux-oracle-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-2 linux-aws-fips, linux-fips, linux-gcp-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7889-3 linux-realtime, linux-realtime-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- ALSA-2025:20518 Moderate: kernel security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2025:20518 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- WID-SEC-2026-2253 IBM Security Verify Access: Mehrere Schwachstellen BSI CERT-Bund (WID) · Sep 17, 2026
- SUSE-SU-2025:20270-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20283-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20192-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20206-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:01614-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:01967-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:01919-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:01951-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:01964-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:01707-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- RLSA-2025:20518 Moderate: kernel security update Rocky Linux Security Advisories · Nov 21, 2025
- ELSA-2025-20530 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Aug 18, 2025
- ELSA-2025-20480 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Jul 17, 2025
References
- https://git.kernel.org/stable/c/02d78fb7fa1f4f4d6ecc6034e81c6db38385ce96
- https://git.kernel.org/stable/c/7368f88b2e62d043cd64fe7bdd5c3c2a2f9795b0
- https://git.kernel.org/stable/c/2403cb3c235d5e339b580cc3a825493769fadca8
- https://git.kernel.org/stable/c/5afcd6fcd1e1c1fd6bcc9a360c121d10eddade67
- https://git.kernel.org/stable/c/ba4bb0402c60e945c4c396c51f0acac3c3e3ea5c