diff -Nru thermald-1.7.0/debian/changelog thermald-1.7.0/debian/changelog --- thermald-1.7.0/debian/changelog 2018-04-17 15:22:21.000000000 +0000 +++ thermald-1.7.0/debian/changelog 2018-04-20 01:08:23.000000000 +0000 @@ -1,3 +1,12 @@ +thermald (1.7.0-5ubuntu1) bionic; urgency=medium + + [ Ben Caradoc-Davies ] + * Fix non-initialized temp_unreadable (Closes: #896132) (LP: #1765572) + - fixes regression caused by previous fix, initialise + temp_unreadable to restore temperature control. + + -- Colin King Fri, 20 Apr 2018 02:08:23 +0100 + thermald (1.7.0-5) unstable; urgency=medium * Don't continually re-read broken temperature sysfs file (LP: #1764320) diff -Nru thermald-1.7.0/debian/control thermald-1.7.0/debian/control --- thermald-1.7.0/debian/control 2018-03-06 08:49:37.000000000 +0000 +++ thermald-1.7.0/debian/control 2018-04-20 01:08:23.000000000 +0000 @@ -1,7 +1,8 @@ Source: thermald Section: admin Priority: optional -Maintainer: Colin King +Maintainer: Colin King +XSBC-Original-Maintainer: Colin King Standards-Version: 4.1.2 Build-Depends: debhelper (>= 10), quilt, autoconf, libglib2.0-dev, libdbus-1-dev, libdbus-glib-1-dev, libxml2-dev Homepage: https://github.com/01org/thermal_daemon diff -Nru thermald-1.7.0/debian/patches/0003-thermald-fix-uninitialised-member.patch thermald-1.7.0/debian/patches/0003-thermald-fix-uninitialised-member.patch --- thermald-1.7.0/debian/patches/0003-thermald-fix-uninitialised-member.patch 1970-01-01 00:00:00.000000000 +0000 +++ thermald-1.7.0/debian/patches/0003-thermald-fix-uninitialised-member.patch 2018-04-20 01:08:23.000000000 +0000 @@ -0,0 +1,45 @@ +From: Ben Caradoc-Davies +To: Debian Bug Tracking System +Date: Fri, 20 Apr 2018 10:51:10 +1200 +Subject: Bug#896132: thermald uninitialised member causes loss of temperature control + +Package: thermald +Version: 1.7.0-5 +Severity: critical +Tags: patch +Justification: breaks the whole system + +Dear Maintainer, + +0002-Don-t-keep-on-reading-a-sensor-if-the-temperature-is.patch, added in +1.7.0-5, +introduces a new cthd_sensor data member temp_unreadable but fails to +initialise it. +This causes nondeterministic behaviour. If any bits of the uninitialised +boolean are +nonzero, it will be evaluate to true, and the sensor will be silently disabled, +causing loss of temperature control. + +This bug is critical because loss of temperature control risks physical +hardware damage. + +Attached patch initialises temp_unreadable to restore temperature control. + +Kind regards, +Ben. + +--- + +Index: thermald-1.7.0/src/thd_sensor.cpp +=================================================================== +--- thermald-1.7.0.orig/src/thd_sensor.cpp ++++ thermald-1.7.0/src/thd_sensor.cpp +@@ -28,7 +28,7 @@ + cthd_sensor::cthd_sensor(int _index, std::string control_path, + std::string _type_str, int _type) : + index(_index), type(_type), sensor_sysfs(control_path.c_str()), sensor_active( +- false), type_str(_type_str), async_capable(false), virtual_sensor(false), thresholds(0) { ++ false), type_str(_type_str), async_capable(false), virtual_sensor(false), temp_unreadable(false), thresholds(0) { + + } + diff -Nru thermald-1.7.0/debian/patches/series thermald-1.7.0/debian/patches/series --- thermald-1.7.0/debian/patches/series 2018-04-17 15:21:28.000000000 +0000 +++ thermald-1.7.0/debian/patches/series 2018-04-20 01:08:23.000000000 +0000 @@ -1,2 +1,3 @@ 0001-Remove-upstart-support.patch 0002-Don-t-keep-on-reading-a-sensor-if-the-temperature-is.patch +0003-thermald-fix-uninitialised-member.patch