power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c0984e5a75337df513047ec92a6c09d78e3e5cd · < ffb8e92b4cef92bd25563cf3d8b4489eb22bc61f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init
kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add():
If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object.
Fix memory leak by calling kobject_put().
From the CVE record · Linux
The Linux kernel's ab8500 fuel gauge sysfs initialization can leak memory if kobject_init_and_add() fails because its reference is not released. The input does not describe how an attacker could trigger the failure or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the ab8500 fuel gauge code should check their versions; affected versions are not specified.