PM: hibernate: defer device probing when resuming from hibernation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c751085943362143f84346d274e0011419c84202 · < b8e1ae9433d7bd95f2dcc044a7a6f20a4c40d258| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PM: hibernate: defer device probing when resuming from hibernation
syzbot is reporting hung task at misc_open() [1], for there is a race window of AB-BA deadlock which involves probe_count variable. Currently wait_for_device_probe() from snapshot_open() from misc_open() can sleep forever with misc_mtx held if probe_count cannot become 0.
When a device is probed by hub_event() work function, probe_count is incremented before the probe function starts, and probe_count is decremented after the probe function completed.
There are three cases that can prevent probe_count from dropping to 0.
(a) A device being probed stopped responding (i.e. broken/malicious hardware).
(b) A process emulating a USB device using /dev/raw-gadget interface stopped responding for some reason.
(c) New device probe requests keeps coming in before existing device probe requests complete.
From the CVE record · Linux
A race in Linux kernel hibernation resume can leave a process waiting indefinitely for device probing while holding a mutex. This can happen when a probed device stops responding, USB device emulation through /dev/raw-gadget stalls, or new probe requests keep arriving. The reported case involved a local process emulating a USB device; authentication requirements are not specified.
Anyone running the Linux kernel should check whether their build includes the hibernation resume fix; affected versions are not specified.