net: marvell: prestera: fix NULL dereference on devlink_alloc() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 34dd1710f5a3c9a7dc78e1ff6de69a19d407db25 · < a428e0da1248c353557970848994f35fd3f005e2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: marvell: prestera: fix NULL dereference on devlink_alloc() failure
devlink_alloc() may return NULL on allocation failure, but prestera_devlink_alloc() unconditionally calls devlink_priv() on the returned pointer.
This leads to a NULL pointer dereference if devlink allocation fails. Add a check for a NULL devlink pointer and return NULL early to avoid the crash.
From the CVE record · Linux
The Linux kernel's Marvell Prestera driver can dereference a NULL pointer if devlink allocation fails, causing a crash. The input does not establish whether an attacker can trigger the failure or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the Marvell Prestera driver should check their versions; affected versions were not provided.