{"id":"CVE-2026-139405","state":"PUBLISHED","title":"thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal/drivers/ti-soc-thermal: Cancel pending alert work on remove\n\nOn a threshold crossing, the talert IRQ handler calls\nti_thermal_report_sensor_temperature(), which queues the work embedded\nin the sensor's ti_thermal_data on the system workqueue. Nothing ever\ncancels or flushes that work.\n\nti_bandgap_remove() frees the talert IRQ last. free_irq() waits for a\nrunning handler, but not for the work the handler has queued. When\nremove returns, devres unregisters and frees the thermal zones and then\nfrees the devm-allocated ti_thermal_data, so a work item that is still\npending runs ti_thermal_work() on freed memory:\n\n\tti_thermal_work()\n\t  data = container_of(work, struct ti_thermal_data, thermal_wq);\n\t  thermal_zone_device_update(data->ti_thermal, ...);\n\nFree the talert IRQ before removing the sensors, so that no new work\ncan be queued, and cancel the work in ti_thermal_remove_sensor().\n\nThis needs an OMAP4460/4470 or OMAP5 SoC (DRA7 has TALERT but no\n->report_temperature, so it never queues the work), a threshold crossing\njust before the driver is unbound or unloaded, and the work still\npending when devres frees the data.\n\nFound by static analysis tool CodeQL.","publishedAt":"2026-11-30T13:34:27.168Z","updatedAt":"2026-11-30T13:34:27.168Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"c6bf7c8c3ff447a23c9ca70496e23bbee8021ff5","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"178e078eee6f99a771683321607afc1e8452e724","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"da057b9533721fdeaae30772fdf6a8d8b01d6870","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"4183df28a3564878457f7bc9f35b5fc9fa4fe28a","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"992585e3729ac54b882dcecc38b34b1060a5b386","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"0888e4e235f281bedb7c1c7c5a27a0bf0064b6f7","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"9d8d1431ca2bf32658a7494770f6bfb2e478ee98","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"aaa6c8dec49339710f9fd2a2af5646cf4111dbd4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/ti-soc-thermal/ti-bandgap.c","drivers/thermal/ti-soc-thermal/ti-thermal-common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.6","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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/thermal/ti-soc-thermal/ti-bandgap.c","drivers/thermal/ti-soc-thermal/ti-thermal-common.c"]}],"references":["https://git.kernel.org/stable/c/c6bf7c8c3ff447a23c9ca70496e23bbee8021ff5","https://git.kernel.org/stable/c/178e078eee6f99a771683321607afc1e8452e724","https://git.kernel.org/stable/c/da057b9533721fdeaae30772fdf6a8d8b01d6870","https://git.kernel.org/stable/c/4183df28a3564878457f7bc9f35b5fc9fa4fe28a","https://git.kernel.org/stable/c/992585e3729ac54b882dcecc38b34b1060a5b386","https://git.kernel.org/stable/c/0888e4e235f281bedb7c1c7c5a27a0bf0064b6f7","https://git.kernel.org/stable/c/9d8d1431ca2bf32658a7494770f6bfb2e478ee98","https://git.kernel.org/stable/c/aaa6c8dec49339710f9fd2a2af5646cf4111dbd4"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139405.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139405","state":"PUBLISHED","datePublished":"2026-11-30T13:34:27.168Z","dateUpdated":"2026-11-30T13:34:27.168Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.931Z"},"containers":{"cna":{"title":"thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal/drivers/ti-soc-thermal: Cancel pending alert work on remove\n\nOn a threshold crossing, the talert IRQ handler calls\nti_thermal_report_sensor_temperature(), which queues the work embedded\nin the sensor's ti_thermal_data on the system workqueue. Nothing ever\ncancels or flushes that work.\n\nti_bandgap_remove() frees the talert IRQ last. free_irq() waits for a\nrunning handler, but not for the work the handler has queued. When\nremove returns, devres unregisters and frees the thermal zones and then\nfrees the devm-allocated ti_thermal_data, so a work item that is still\npending runs ti_thermal_work() on freed memory:\n\n\tti_thermal_work()\n\t  data = container_of(work, struct ti_thermal_data, thermal_wq);\n\t  thermal_zone_device_update(data->ti_thermal, ...);\n\nFree the talert IRQ before removing the sensors, so that no new work\ncan be queued, and cancel the work in ti_thermal_remove_sensor().\n\nThis needs an OMAP4460/4470 or OMAP5 SoC (DRA7 has TALERT but no\n->report_temperature, so it never queues the work), a threshold crossing\njust before the driver is unbound or unloaded, and the work still\npending when devres frees the data.\n\nFound by static analysis tool CodeQL."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"c6bf7c8c3ff447a23c9ca70496e23bbee8021ff5","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"178e078eee6f99a771683321607afc1e8452e724","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"da057b9533721fdeaae30772fdf6a8d8b01d6870","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"4183df28a3564878457f7bc9f35b5fc9fa4fe28a","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"992585e3729ac54b882dcecc38b34b1060a5b386","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"0888e4e235f281bedb7c1c7c5a27a0bf0064b6f7","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"9d8d1431ca2bf32658a7494770f6bfb2e478ee98","versionType":"git"},{"version":"445eaf871bf94eb496b9b610e35b9e8c8830219f","status":"affected","lessThan":"aaa6c8dec49339710f9fd2a2af5646cf4111dbd4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/ti-soc-thermal/ti-bandgap.c","drivers/thermal/ti-soc-thermal/ti-thermal-common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.6","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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/thermal/ti-soc-thermal/ti-bandgap.c","drivers/thermal/ti-soc-thermal/ti-thermal-common.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c6bf7c8c3ff447a23c9ca70496e23bbee8021ff5"},{"url":"https://git.kernel.org/stable/c/178e078eee6f99a771683321607afc1e8452e724"},{"url":"https://git.kernel.org/stable/c/da057b9533721fdeaae30772fdf6a8d8b01d6870"},{"url":"https://git.kernel.org/stable/c/4183df28a3564878457f7bc9f35b5fc9fa4fe28a"},{"url":"https://git.kernel.org/stable/c/992585e3729ac54b882dcecc38b34b1060a5b386"},{"url":"https://git.kernel.org/stable/c/0888e4e235f281bedb7c1c7c5a27a0bf0064b6f7"},{"url":"https://git.kernel.org/stable/c/9d8d1431ca2bf32658a7494770f6bfb2e478ee98"},{"url":"https://git.kernel.org/stable/c/aaa6c8dec49339710f9fd2a2af5646cf4111dbd4"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:27.168Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}