CVE-2026-98160 PUBLISHED

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

Assigner: Linux
Reserved: 25.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to ff6d1ba247b5c62bdb678f1069abc86ad88a1402 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to d6158333d630a1b21d8914feaf77a6f5deb185d9 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 6c017ab2b0e1b60b5be94636c94720347213d78b (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 4520d673d49dabfd42c008a33889251025f7d6d5 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 423574feaed192063ef0cd0813fb85425f39e539 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 737c928ff5092d7e55128a232c231248fc993777 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 911190f0b9511c3c81f2f2484414c1ae26f636b3 (excl.)
  • affected from 554c0a3abf216c991c5ebddcdb2c08689ecd290b to 264676418b726baca7be49171e306b6aa05cceb0 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.12 is affected
  • unaffected from 0 to 4.12 (excl.)
  • unaffected from 5.10.270 to 5.10.* (incl.)
  • unaffected from 5.15.221 to 5.15.* (incl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.52 to 6.18.* (incl.)
  • unaffected from 7.2.6 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References