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

staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()

padapter->HalData is allocated via vzalloc(), but incorrectly freed
using kfree() in the rtw_sdio_if1_init() error path. Using kfree() to
release this vmalloc-backed buffer can lead to memory corruption.

Use rtw_hal_data_deinit() to pair the free correctly and free
HalData with vfree().

The bug was first flagged by an experimental static analysis tool we
are developing for kernel memory-management bugs. Manual inspection
confirms that the issue is still present in current mainline.

An x86_64 allyesconfig build showed no new warnings. As we do not have
suitable RTL8723BS SDIO hardware to test with, no runtime testing was
able to be performed.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Memory corruption potentially enabling code execution or system crash
Action: Patch Upgrade
AI Analysis

Impact

The Linux kernel staging driver for the Realtek RTL8723BS wireless chipset allocates the HalData structure with vzalloc but frees it with kfree in an error path of rtw_sdio_if1_init(). Using kfree on vmalloc-backed memory corrupts the kernel heap, which can lead to arbitrary code execution or a kernel panic, thereby compromising system availability and integrity.

Affected Systems

The flaw resides in the rtl8723bs driver that ships with the mainline Linux kernel. Any kernel build that includes this staging driver and enables RTL8723BS SDIO hardware is potentially vulnerable; the issue existed across any release prior to the applied patch.

Risk and Exploitability

No CVSS or EPSS scores are listed and the vulnerability is not in CISA’s KEV catalog, suggesting a lower probability of exploitation in the wild. Nevertheless, the flaw can be triggered in an environment where an attacker can cause the driver’s initialization to fail, resulting in memory corruption. The vendor fix replaces the incorrect kfree call with rtw_hal_data_deinit() that uses vfree, restoring proper memory management.

Generated by OpenCVE AI on September 25, 2026 at 17:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that contains the rtl8723bs driver patch which uses rtw_hal_data_deinit() and vfree() for HalData
  • Verify that the driver source shows the correct deinitialization path and that no kfree references remain
  • If a kernel update is not immediately available, disable the rtl8723bs SDIO interface (e.g., unload the driver or block the device) to prevent the error path from executing until the patch is applied

Generated by OpenCVE AI on September 25, 2026 at 17:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-772

Fri, 25 Sep 2026 13:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init() padapter->HalData is allocated via vzalloc(), but incorrectly freed using kfree() in the rtw_sdio_if1_init() error path. Using kfree() to release this vmalloc-backed buffer can lead to memory corruption. Use rtw_hal_data_deinit() to pair the free correctly and free HalData with vfree(). The bug was first flagged by an experimental static analysis tool we are developing for kernel memory-management bugs. Manual inspection confirms that the issue is still present in current mainline. An x86_64 allyesconfig build showed no new warnings. As we do not have suitable RTL8723BS SDIO hardware to test with, no runtime testing was able to be performed.
Title staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T13:06:50.521Z

Reserved: 2026-09-25T10:25:14.321Z

Link: CVE-2026-98160

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T14:17:27.627

Modified: 2026-09-25T14:17:27.627

Link: CVE-2026-98160

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T17:30:16Z

Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime