watchdog: pretimeout: Fix UAF in watchdog_unregister_governor()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ da0d12ff2b829a35e9921918e925d79497b82bef · < 7d1658b066de30f4b23afc14814d22416a971e6e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
watchdog: pretimeout: Fix UAF in watchdog_unregister_governor()
When a watchdog governor is unregistered, it updates existing watchdog devices that were using this governor by falling back to `default_gov`.
If the governor being unregistered is currently set as `default_gov`, the `default_gov` is never cleared. This leads to 2 use-after-free issues: 1. New watchdog devices registered after this point will inherit the dangling `default_gov`. 2. Existing watchdog devices using the unregistered governor will have their `wdd->gov` reassigned to the dangling `default_gov`.
Fix the UAF by clearing `default_gov` if it matches the governor being unregistered.
From the CVE record · Linux
Unregistering the default watchdog governor leaves a dangling pointer that can cause use-after-free when new watchdog devices register or existing devices are reassigned. The input does not establish an attacker action or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with watchdog pretimeout governors should check their kernels; affected versions are not specified.