CVE-2024-43830: leds: trigger: Unregister sysfs attributes before calling deactivate()
In the Linux kernel, the following vulnerability has been resolved:
leds: trigger: Unregister sysfs attributes before calling deactivate()
Triggers which have trigger specific sysfs attributes typically store related data in trigger-data allocated by the activate() callback and freed by the deactivate() callback.
Calling deviceremovegroups() after calling deactivate() leaves a window where the sysfs attributes show/store functions could be called after deactivation and then operate on the just freed trigger-data.
Move the deviceremovegroups() call to before deactivate() to close this race window.
This also makes the deactivation path properly do things in reverse order of the activation path which calls the activate() callback before calling deviceaddgroups().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Configuration
In the leds trigger deactivation path, call device_remove_groups() before calling the trigger's deactivate() callback so sysfs show/store cannot run after trigger-data is freed by deactivate().
Linux kernel (leds: trigger) deactivation order (device_remove_groups vs deactivate) = Move device_remove_groups() call to before deactivate()
Event History
Frequently Asked Questions
What is the severity of CVE-2024-43830?
CVE-2024-43830 is considered a vulnerability in the Linux kernel related to improper handling of sysfs attributes.
How do I fix CVE-2024-43830?
To fix CVE-2024-43830, update to the patched versions of the Linux kernel as specified in the advisory.
What are the affected versions of Linux for CVE-2024-43830?
CVE-2024-43830 affects Linux kernel versions up to 5.10.223-1 and specific 6.1 versions prior to their patched releases.
What impact does CVE-2024-43830 have on system security?
CVE-2024-43830 may lead to potential exploitation due to improper attribute deactivation in Linux kernel triggers.
Is CVE-2024-43830 specific to a certain Linux distribution?
CVE-2024-43830 primarily affects Debian-based distributions that utilize the specified Linux kernel versions.