soc: xilinx: Fix race condition in event registration
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
soc: xilinx: Fix race condition in event registration
The zynqmp_power driver registers handlers for suspend and subsystem restart events using register_event(). However, the work structures (zynqmp_pm_init_suspend_work and zynqmp_pm_init_restart_work) used by these handlers were allocated and initialized after the registration call.
This created a race window where, if the firmware triggered an event immediately after registration but before allocation, the callback (suspend_event_callback or subsystem_restart_event_callback) would dereference a NULL pointer in work_pending(), leading to a crash.
Fix this by allocating and initializing the work structures before registering the events.
From the CVE record · Linux
The zynqmp_power driver registers event handlers before initializing the work structures they use. A firmware event arriving in that window can cause a NULL-pointer dereference and crash the kernel. The input does not establish whether an attacker can trigger the event or whether authentication or user interaction is involved.
Engineers running Linux kernels with the Xilinx zynqmp_power driver should check their kernel; affected versions are not specified.