platform/x86: toshiba_haps: Fix memory leaks in add/remove routines
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 23d0ba0c908ac10139f0351023c64198d7fc1409 · < f93ae43780b759a70734be9bc82c1adcf7f33208| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's toshiba_haps component leaks memory when its add routine fails after allocation or when its remove routine clears a pointer without freeing the object. The input does not describe how an attacker could trigger these paths or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the toshiba_haps component should check their versions; affected versions are not specified.