net: mana: Guard mana_remove against double invocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 635096a86edb067d55a1e04b4a918f5c6dac0c51 · < 50271d7ec95144d26808025b508f463780517d3c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: mana: Guard mana_remove against double invocation
If PM resume fails (e.g., mana_attach() returns an error), mana_probe() calls mana_remove(), which tears down the device and sets gd->gdma_context = NULL and gd->driver_data = NULL.
However, a failed resume callback does not automatically unbind the driver. When the device is eventually unbound, mana_remove() is invoked a second time. Without a NULL check, it dereferences gc->dev with gc == NULL, causing a kernel panic.
Add an early return if gdma_context or driver_data is NULL so the second invocation is harmless. Move the dev = gc->dev assignment after the guard so it cannot dereference NULL.
From the CVE record · Linux
The Linux kernel mana driver can dereference a NULL pointer if a failed power-management resume leads to device teardown and the device is later unbound. The second removal can cause a kernel panic. The input does not establish whether an attacker can trigger these conditions or whether authentication or user interaction is required.
Engineers running Linux kernels with the mana driver should check their versions against their kernel vendor’s advisory; affected versions were not provided.