can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8537257874e949a59c834cecfd5a063e11b64b0b · < 38c0abad45b190a30d8284a37264d2127a6ec303| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
Sending an PF_PACKET allows to bypass the CAN framework logic and to directly reach the xmit() function of a CAN driver. The only check which is performed by the PF_PACKET framework is to make sure that skb->len fits the interface's MTU.
Unfortunately, because the etas_es58x driver does not populate its net_device_ops->ndo_change_mtu(), it is possible for an attacker to configure an invalid MTU by doing, for example:
$ ip link set can0 mtu 9999
After doing so, the attacker could open a PF_PACKET socket using the ETH_P_CANXL protocol:
socket(PF_PACKET, SOCK_RAW, htons(ETH_P_CANXL));
to inject a malicious CAN XL frames. For example:
From the CVE record · Linux
The Linux kernel's etas_es58x CAN driver does not restrict MTU changes to supported values. A local attacker who can set an invalid MTU and send a crafted CAN XL frame through a PF_PACKET socket can trigger a buffer overflow.
Engineers running Linux kernels with the etas_es58x CAN driver should check their kernel against the vendor advisory; affected versions were not specified.