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().
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb6a9d67cfd812a547ac73ec02e1077c26c640d",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-271b2050",
"digest": {
"length": 1837.0,
"function_hash": "144825613408422804193642309640492476530"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0788a6f3523d3686a9eed5ea1e6fcce6841277b2",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-5cd2c7ef",
"digest": {
"length": 1899.0,
"function_hash": "152599948700825301975140613850094166579"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb8aa9d2a4c8a15d6a43ccf901ef3d094aa60374",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-68db2f62",
"digest": {
"length": 1856.0,
"function_hash": "204175965347774963570975039099739836682"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1415125b701ef13370e2761f691ec632a5eb93a",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-6b268b2d",
"digest": {
"length": 1837.0,
"function_hash": "144825613408422804193642309640492476530"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c3b7a650c8717aa89df318364609c86cbc040156",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-73d43b68",
"digest": {
"length": 1837.0,
"function_hash": "144825613408422804193642309640492476530"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c1583f0e10c918855d6e7540a79461a353e5d6",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-8d893d1f",
"digest": {
"length": 1837.0,
"function_hash": "144825613408422804193642309640492476530"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0dc9adf9474ecb7106e60e5472577375aedaed3",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-9fb66849",
"digest": {
"threshold": 0.9,
"line_hashes": [
"186363301513546130078857616528758032608",
"9670682645535607624996670654696105936",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb8aa9d2a4c8a15d6a43ccf901ef3d094aa60374",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-b14670da",
"digest": {
"threshold": 0.9,
"line_hashes": [
"186363301513546130078857616528758032608",
"9670682645535607624996670654696105936",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@734ba6437e80dfc780e9ee9d95f912392d12b5ea",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-b2640cdf",
"digest": {
"length": 1810.0,
"function_hash": "241878328061452227097770060460803872654"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0788a6f3523d3686a9eed5ea1e6fcce6841277b2",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-b52f77a2",
"digest": {
"threshold": 0.9,
"line_hashes": [
"186363301513546130078857616528758032608",
"9670682645535607624996670654696105936",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb6a9d67cfd812a547ac73ec02e1077c26c640d",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-b960c8da",
"digest": {
"threshold": 0.9,
"line_hashes": [
"196437696832147162771496212790933032511",
"61475365741223795217806652688592403005",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c1583f0e10c918855d6e7540a79461a353e5d6",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-bfc0f88a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"196437696832147162771496212790933032511",
"61475365741223795217806652688592403005",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1415125b701ef13370e2761f691ec632a5eb93a",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-c0b4ae3c",
"digest": {
"threshold": 0.9,
"line_hashes": [
"196437696832147162771496212790933032511",
"61475365741223795217806652688592403005",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@734ba6437e80dfc780e9ee9d95f912392d12b5ea",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-c95a2955",
"digest": {
"threshold": 0.9,
"line_hashes": [
"186363301513546130078857616528758032608",
"9670682645535607624996670654696105936",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0dc9adf9474ecb7106e60e5472577375aedaed3",
"target": {
"function": "led_trigger_set",
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-de1571dd",
"digest": {
"length": 1899.0,
"function_hash": "152599948700825301975140613850094166579"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c3b7a650c8717aa89df318364609c86cbc040156",
"target": {
"file": "drivers/leds/led-triggers.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2024-43830-f4fde737",
"digest": {
"threshold": 0.9,
"line_hashes": [
"196437696832147162771496212790933032511",
"61475365741223795217806652688592403005",
"123563580904765865849667434366509913154",
"299290359008755238336585120067532441822",
"157866140865677672048376251253262769898",
"159676583377618090766292526045619968906",
"322927860449328716937626237556025232354"
]
},
"signature_type": "Line"
}
]