Skip to content
Fencer Vulns
high 7.8

CVE-2025-21729 json

wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion

published 2025-02-27 20 mo ago modified 2026-10-30 9 d ago also EUVD-2025-5218

cvss
7.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 14%
public exploits
0
none known

Summary

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>

Patch / fix

  • Linux Linux 6.1.191, 6.6.160, 6.12.13, 6.13.2, 6.14
  • linux Debian 14, Debian 13 6.12.13-1

debian advisories DEBIAN-CVE-2025-21729

  • linux Ubuntu 24.04 LTS 6.8.0-88.89
  • linux-aws Ubuntu 24.04 LTS 6.8.0-1043.45
  • linux-gcp Ubuntu 24.04 LTS 6.8.0-1044.47
  • linux-gke Ubuntu 24.04 LTS 6.8.0-1040.45
  • linux-ibm Ubuntu 24.04 LTS 6.8.0-1041.41
  • linux-azure Ubuntu 24.04 LTS 6.8.0-1044.50
  • linux-gkeop Ubuntu 24.04 LTS 6.8.0-1027.30
  • linux-raspi Ubuntu 24.04 LTS 6.8.0-1043.47

ubuntu advisories UBUNTU-CVE-2025-21729

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel RHEL 9 5.14.0-611.5.1.el9_7
  • rv RHEL 9 5.14.0-611.5.1.el9_7
  • perf RHEL 9 5.14.0-611.5.1.el9_7
  • rtla RHEL 9 5.14.0-611.5.1.el9_7
  • libperf RHEL 9 5.14.0-611.5.1.el9_7
  • kernel-rt RHEL 9 5.14.0-611.5.1.el9_7
  • kernel-64k RHEL 9 5.14.0-611.5.1.el9_7
  • kernel-core RHEL 9 5.14.0-611.5.1.el9_7

red hat advisories RHSA-2025:20518

  • kernel-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
  • kernel-syms-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
  • kernel-source-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
  • kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
  • kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
  • kernel-rt_debug Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
  • kernel-source-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
  • kernel-64kb SLE Module for Basesystem 15 SP7 6.4.0-150700.53.3.1

suse advisories SUSE-SU-2025:01967-1SUSE-SU-2025:01964-1SUSE-SU-2025:01951-1SUSE-SU-2025:01919-1SUSE-SU-2025:01707-1SUSE-SU-2025:01614-1

  • kernel AlmaLinux 9 5.14.0-611.5.1.el9_7
  • rv AlmaLinux 9 5.14.0-611.5.1.el9_7
  • perf AlmaLinux 9 5.14.0-611.5.1.el9_7
  • rtla AlmaLinux 9 5.14.0-611.5.1.el9_7
  • libperf AlmaLinux 9 5.14.0-611.5.1.el9_7
  • kernel-rt AlmaLinux 9 5.14.0-611.5.1.el9_7
  • kernel-64k AlmaLinux 9 5.14.0-611.5.1.el9_7
  • kernel-core AlmaLinux 9 5.14.0-611.5.1.el9_7

almalinux advisories ALSA-2025:20518

  • kernel Rocky Linux 9 5.14.0-611.5.1.el9_7

rocky linux advisories RLSA-2025:20518

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-21729 updated cvss 5.5

kernel: wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion

  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 10 kernel
    affected: no fix available “Fix deferred”
  • Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-611.5.1.el9_7, perf 5.14.0-611.5.1.el9_7, rtla 5.14.0-611.5.1.el9_7, python3-perf 5.14.0-611.5.1.el9_7, kernel-devel-matched 5.14.0-611.5.1.el9_7, kernel-64k-devel-matched 5.14.0-611.5.1.el9_7, +7 more Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-611.5.1.el9_7, kernel-64k 5.14.0-611.5.1.el9_7, kernel-core 5.14.0-611.5.1.el9_7, kernel-tools 5.14.0-611.5.1.el9_7, kernel-modules 5.14.0-611.5.1.el9_7, kernel-64k-core 5.14.0-611.5.1.el9_7, +27 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-611.5.1.el9_7, kernel-debuginfo-common-s390x 5.14.0-611.5.1.el9_7, kernel-debuginfo-common-x86_64 5.14.0-611.5.1.el9_7, kernel-debuginfo-common-aarch64 5.14.0-611.5.1.el9_7, kernel-debuginfo-common-ppc64le 5.14.0-611.5.1.el9_7 Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-611.5.1.el9_7, kernel-rt-64k 5.14.0-611.5.1.el9_7, kernel-rt-core 5.14.0-611.5.1.el9_7, kernel-rt-modules 5.14.0-611.5.1.el9_7, kernel-rt-64k-core 5.14.0-611.5.1.el9_7, kernel-rt-debug-core 5.14.0-611.5.1.el9_7, +14 more Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-611.5.1.el9_7, kernel-rt-core 5.14.0-611.5.1.el9_7, kernel-rt-modules 5.14.0-611.5.1.el9_7, kernel-rt-debug-core 5.14.0-611.5.1.el9_7, kernel-rt-modules-core 5.14.0-611.5.1.el9_7, kernel-rt-debug-modules 5.14.0-611.5.1.el9_7, +4 more
    fixed: vendor fix RHSA-2025:20518
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
20 mo ago

Exploit prediction

0.24% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CISA ADP 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.