CVE-2026-23176: platform/x86: toshiba_haps: Fix memory leaks in add/remove routines
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: toshiba_haps: Fix memory leaks in add/remove routines
toshiba_haps_add() leaks the haps object allocated by it if it returns an error after allocating that object successfully.
toshiba_haps_remove() does not free the object pointed to by toshiba_haps before clearing that pointer, so it becomes unreachable allocated memory.
Address these memory leaks by using devm_kzalloc() for allocating the memory in question.
The Linux kernel CVE team has assigned CVE-2026-23176 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 5.10.250 with commit 17f37c4cdf42a9e4915216b9e130fc8baef4cc64 Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 5.15.200 with commit 5bce10f0f9435afaae3fc4df9a52b01d9b3853dc Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 6.1.163 with commit f2093e87ddec13e7a920f326c078a5f765ba89c3 Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 6.6.124 with commit ca9ff71c15bc8e48529c2033294a519a7749b272 Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 6.12.70 with commit bf0474356875d005d420f8c6b9ac168566e72e87 Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 6.18.10 with commit f93ae43780b759a70734be9bc82c1adcf7f33208 Issue introduced in 3.17 with commit 23d0ba0c908ac10139f0351023c64198d7fc1409 and fixed in 6.19 with commit 128497456756e1b952bd5a912cd073836465109d
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-23176
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/platform/x86/toshiba_haps.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/17f37c4cdf42a9e4915216b9e130fc8baef4cc64 https://git.kernel.org/stable/c/5bce10f0f9435afaae3fc4df9a52b01d9b3853dc https://git.kernel.org/stable/c/f2093e87ddec13e7a920f326c078a5f765ba89c3 https://git.kernel.org/stable/c/ca9ff71c15bc8e48529c2033294a519a7749b272 https://git.kernel.org/stable/c/bf0474356875d005d420f8c6b9ac168566e72e87 https://git.kernel.org/stable/c/f93ae43780b759a70734be9bc82c1adcf7f33208 https://git.kernel.org/stable/c/128497456756e1b952bd5a912cd073836465109d