{"id":"CVE-2026-139656","state":"PUBLISHED","title":"leds: st1202: Take a reference on the LED firmware node","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nleds: st1202: Take a reference on the LED firmware node\n\nst1202_dt_init() stores each LED's firmware node while walking the\ndevice tree with for_each_available_child_of_node_scoped(), which drops\nits reference to the node at the end of every iteration. The LED class\nstores the pointer with device_set_node() and does not take a reference\nof its own, so nothing keeps the node alive for as long as the LED\ndevice uses it. That has been the case since the driver was added, when\nthe LED class devices were registered inside that same loop.\n\nCommit c72e455b89f2 (\"leds: leds-st1202: Fix NULL pointer access on race\ncondition\") moved the registration into a separate loop in\nst1202_probe(), which also leaves the stored pointer unreferenced\nbetween the two loops.\n\nWith CONFIG_OF_DYNAMIC the node can be freed while it is still in use,\nleaving led->fwnode and the LED device's firmware node dangling.\n\nTake a reference when the node is stored and release it through a devm\naction. The action is registered before the LED class devices are, so it\nruns after they have been unregistered.","publishedAt":"2026-11-30T13:36:46.239Z","updatedAt":"2026-11-30T13:36:46.239Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"484f13fc8c23dfb460836b31c73145cbf7f31f61","versionType":"git"},{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"9f76fdb33f1ce78d8ef41a0f912f42113c7dd253","versionType":"git"},{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"5882de94edf7a53812a76a882a95e1e86d7105d9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/leds/leds-st1202.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/leds/leds-st1202.c"]}],"references":["https://git.kernel.org/stable/c/484f13fc8c23dfb460836b31c73145cbf7f31f61","https://git.kernel.org/stable/c/9f76fdb33f1ce78d8ef41a0f912f42113c7dd253","https://git.kernel.org/stable/c/5882de94edf7a53812a76a882a95e1e86d7105d9"],"weaknesses":[],"ingestedAt":"2026-11-30T13:54:04.526Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139656.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139656","state":"PUBLISHED","datePublished":"2026-11-30T13:36:46.239Z","dateUpdated":"2026-11-30T13:36:46.239Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.946Z"},"containers":{"cna":{"title":"leds: st1202: Take a reference on the LED firmware node","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nleds: st1202: Take a reference on the LED firmware node\n\nst1202_dt_init() stores each LED's firmware node while walking the\ndevice tree with for_each_available_child_of_node_scoped(), which drops\nits reference to the node at the end of every iteration. The LED class\nstores the pointer with device_set_node() and does not take a reference\nof its own, so nothing keeps the node alive for as long as the LED\ndevice uses it. That has been the case since the driver was added, when\nthe LED class devices were registered inside that same loop.\n\nCommit c72e455b89f2 (\"leds: leds-st1202: Fix NULL pointer access on race\ncondition\") moved the registration into a separate loop in\nst1202_probe(), which also leaves the stored pointer unreferenced\nbetween the two loops.\n\nWith CONFIG_OF_DYNAMIC the node can be freed while it is still in use,\nleaving led->fwnode and the LED device's firmware node dangling.\n\nTake a reference when the node is stored and release it through a devm\naction. The action is registered before the LED class devices are, so it\nruns after they have been unregistered."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"484f13fc8c23dfb460836b31c73145cbf7f31f61","versionType":"git"},{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"9f76fdb33f1ce78d8ef41a0f912f42113c7dd253","versionType":"git"},{"version":"259230378c65ebb6b4815b4dd175c5298428b9fa","status":"affected","lessThan":"5882de94edf7a53812a76a882a95e1e86d7105d9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/leds/leds-st1202.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/leds/leds-st1202.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/484f13fc8c23dfb460836b31c73145cbf7f31f61"},{"url":"https://git.kernel.org/stable/c/9f76fdb33f1ce78d8ef41a0f912f42113c7dd253"},{"url":"https://git.kernel.org/stable/c/5882de94edf7a53812a76a882a95e1e86d7105d9"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:46.239Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}