can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices Sending a PF_PACKET bypasses the CAN framework logic and can directly reach a CAN driver's xmit() function. The PF_PACKET framework only checks that skb->len does not exceed the net_device MTU. For a CAN device that is not CAN XL capable, anything above CANFD_MTU (72 bytes) is therefore dropped before it reaches the driver. However, CAN XL frames are variable length. can_is_canxl_skb() accepts lengths in the range CANXL_HDR_SIZE + CANXL_MIN_DLEN up to CANXL_MTU, i.e. 13 to 2060 bytes. As a result, an ETH_P_CANXL skb with a length between 13 and 72 bytes can pass both the MTU and the can_dropped_invalid_skb() checks. A driver that does not support CAN XL will interpret canxl_frame->flags as a length because of the overlap with can_frame->len. And because CANXL_XLF is set, the resulting length is between 128 and 255. For drivers that do not check can_frame->len before copying can_frame->data, as most drivers do, this results in a buffer overflow of up to 247 bytes. Drop ETH_P_CANXL skbs if the device does not have the CAN_CAP_XL capability. Keep can_is_canxl_skb() for the validation of CAN XL skbs.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from fb08cba12b52cba4366e858932307649dc5304e2, before 3b9a1de970054b31958cefc3ac870ce9be00a37f; from fb08cba12b52cba4366e858932307649dc5304e2, before cf888ce290b79831a6029860d772fd128bc798f6; from fb08cba12b52cba4366e858932307649dc5304e2, before 2980a293b4d210ca7cfa89f7d4a9bab4f50ecc19; from fb08cba12b52cba4366e858932307649dc5304e2, before 561e44524ef1e0b62675b75c1fc57997ee49431d; from fb08cba12b52cba4366e858932307649dc5304e2, before 2de9c3df452e159f82ef14ca497e5be407c66493; from fb08cba12b52cba4366e858932307649dc5304e2, before 0fce44e29fce4b07642491b098afb41bd571e4f2 | 3b9a1de970054b31958cefc3ac870ce9be00a37f; cf888ce290b79831a6029860d772fd128bc798f6; 2980a293b4d210ca7cfa89f7d4a9bab4f50ecc19; 561e44524ef1e0b62675b75c1fc57997ee49431d |
| Linux Linux | Software | 6.1 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 6 sources for this flaw, none tagged as a vendor patch.