staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 554c0a3abf216c991c5ebddcdb2c08689ecd290b · < 737c928ff5092d7e55128a232c231248fc993777| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The rtl8723bs staging driver incorrectly frees a vmalloc-backed buffer in the rtw_sdio_if1_init() error path, which can cause memory corruption. The input does not establish how an attacker could trigger this path or whether network access, authentication, or user interaction is required.
Anyone running the Linux kernel with the rtl8723bs staging driver should check their kernel version; affected versions are not specified.