watchdog: unregister PM notifier on watchdog unregister
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 60bcd91aafd22ef62cef9ae2037fa2e1d4da2fb3 · < c70b5bb6f04f77ef90e047d7edc2f476e206909f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
watchdog: unregister PM notifier on watchdog unregister
watchdog_register_device() registers wdd->pm_nb when WDOG_NO_PING_ON_SUSPEND is set, but watchdog_unregister_device() does not remove it. This leaves an embedded notifier block on the PM notifier chain after the watchdog device has been unregistered.
A later suspend/resume notification can then call watchdog_pm_notifier() with a stale watchdog_device pointer, or at minimum after wdd->wd_data has been cleared by watchdog_dev_unregister().
Unregister the PM notifier before tearing down the watchdog device.
From the CVE record · Linux
The Linux kernel fails to remove a watchdog power-management notifier when unregistering a watchdog device configured with WDOG_NO_PING_ON_SUSPEND. A later suspend or resume notification can invoke the notifier with a stale watchdog device pointer or after its data has been cleared. The input does not describe an attacker-controlled trigger, authentication requirement, or user interaction.
Engineers running Linux kernels with watchdog devices configured with WDOG_NO_PING_ON_SUSPEND should check whether their kernel includes the fix; affected versions are not specified.