Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98160 Overview
CVE-2026-98160 is a memory management vulnerability in the Linux kernel's rtl8723bs SDIO Wi-Fi staging driver. The padapter->HalData buffer is allocated with vzalloc() but incorrectly released with kfree() on the error path of rtw_sdio_if1_init(). Mixing the slab allocator free routine with a vmalloc-backed allocation can corrupt kernel memory structures. Maintainers resolved the issue by routing cleanup through rtw_hal_data_deinit(), which properly uses vfree() to release the buffer.
Critical Impact
A mismatched allocator free in a kernel driver error path can corrupt kernel memory, leading to crashes or exploitable instability on systems using RTL8723BS SDIO Wi-Fi hardware.
Affected Products
- Linux kernel drivers/staging/rtl8723bs SDIO Wi-Fi driver
- Mainline Linux kernel versions prior to the fix commits referenced in git.kernel.org
- Linux stable branches receiving the backported fix set
Discovery Timeline
- 2026-09-25 - CVE-2026-98160 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98160
Vulnerability Analysis
The rtl8723bs staging driver supports Realtek RTL8723BS SDIO Wi-Fi adapters. During initialization, rtw_sdio_if1_init() allocates the hardware adapter's HalData structure using vzalloc(), which returns virtually contiguous memory from the vmalloc region. On the error path, the driver incorrectly called kfree() on the same pointer. kfree() expects an address returned by the slab allocator and does not understand vmalloc-backed virtual addresses, so the call can trigger memory corruption, bad-page warnings, slab list corruption, or a kernel oops.
The fix replaces the direct kfree() call with rtw_hal_data_deinit(), which releases HalData through vfree(), matching the original vzalloc() allocation and preventing allocator mismatch. The patch was discovered through an experimental static analysis tool targeting kernel memory-management defects.
Root Cause
The root cause is an allocator mismatch between vzalloc() and kfree(). Kernel allocation APIs are not interchangeable: memory from kmalloc()/kzalloc() must be freed with kfree(), while memory from vmalloc()/vzalloc() must be freed with vfree(). Violating this contract bypasses the vmalloc teardown logic and feeds a virtual address to the slab allocator's bookkeeping, leading to undefined behavior.
Attack Vector
The defective code sits in a driver error path reached during device initialization. Triggering it requires conditions that cause rtw_sdio_if1_init() to fail after HalData allocation, such as resource exhaustion or hardware initialization failures on systems with RTL8723BS SDIO Wi-Fi hardware. No remote network vector is involved. Impact is local and limited to systems that load the vulnerable driver.
The vulnerability is described in prose only. For patch-level detail, see the kernel commits referenced below, including Kernel Git Commit 26467641 and Kernel Git Commit ff6d1ba2.
Detection Methods for CVE-2026-98160
Indicators of Compromise
- Kernel log entries referencing BUG: unable to handle or bad page originating from rtl8723bs module load or unload.
- kfree() or slab corruption warnings in dmesg correlated with SDIO Wi-Fi device probing.
- Repeated oops or panic events on devices that enumerate an RTL8723BS SDIO adapter.
Detection Strategies
- Inventory running Linux hosts for the r8723bs kernel module and compare kernel versions against the fix commits on git.kernel.org.
- Use distribution package manifests to confirm whether backported patches are present in the installed kernel package.
- Enable CONFIG_DEBUG_VM and CONFIG_SLUB_DEBUG in test environments to surface allocator mismatches during driver initialization.
Monitoring Recommendations
- Forward /var/log/kern.log and journalctl -k output to a central logging platform and alert on slab corruption or vmalloc warnings.
- Monitor driver load events for rtl8723bs on embedded and IoT hosts where the module is more commonly present.
- Track kernel package versions across the fleet and alert when hosts fall behind the vendor-supplied stable update.
How to Mitigate CVE-2026-98160
Immediate Actions Required
- Apply the latest Linux stable kernel update from your distribution that includes the rtw_hal_data_deinit() fix.
- On systems that do not require RTL8723BS SDIO Wi-Fi, blacklist the r8723bs module to remove the vulnerable code path.
- Audit kernel build configurations to confirm whether CONFIG_RTL8723BS is enabled unnecessarily.
Patch Information
The fix is applied across mainline and multiple stable branches. Relevant commits include Kernel Git Commit 423574fe, Kernel Git Commit 4520d673, Kernel Git Commit 6c017ab2, Kernel Git Commit 737c928f, Kernel Git Commit 911190f0, and Kernel Git Commit d6158333. Validate inclusion with git log against your source tree or distribution changelog.
Workarounds
- Blacklist the driver by adding blacklist r8723bs to /etc/modprobe.d/blacklist-rtl8723bs.conf on hosts that do not need the hardware.
- Physically remove or disable RTL8723BS SDIO Wi-Fi modules in environments where kernel updates cannot be applied immediately.
- Restrict local physical and administrative access on affected systems to reduce the chance of triggering the error path.
# Configuration example: blacklist the vulnerable staging driver
echo 'blacklist r8723bs' | sudo tee /etc/modprobe.d/blacklist-rtl8723bs.conf
sudo rmmod r8723bs 2>/dev/null || true
sudo update-initramfs -u
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

