net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
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:
net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
If the gmac0 is disabled, the precheck for a valid ingress device will cause a NULL pointer deref and crash the system. This happens because eth->netdev[0] will be NULL but the code will directly try to access netdev_ops.
Instead of just checking for the first net_device, it must be checked if any of the mtk_eth net_devices is matching the netdev_ops of the ingress device.
From the CVE record · Linux
The Linux kernel's mtk_ppe Ethernet code can dereference a NULL pointer when gmac0 is disabled and it checks an ingress device, crashing the system. The input does not establish whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running the Linux kernel with the mtk_ppe Ethernet component should check their systems; affected versions are not specified.