can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 51f3baad7de943780ce0c17bd7975df567dd6e14 · < 6b9fb82df8868dbe9ffea5874b8d35f951faedbb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: mcba_usb: 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 mcba_usb 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 mcba_usb CAN driver can overflow a buffer if an attacker sets an invalid interface MTU and sends a crafted CAN XL frame through a PF_PACKET socket. The attack requires local access to configure the MTU and send the frame; the input does not specify authentication requirements.
Engineers running Linux systems that use the mcba_usb CAN driver should check their kernel version; affected versions are not specified.