can: af_can: fix NULL pointer dereference in can_rcv_filter
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
96340078d50a54f6a1252c62596bc44321c8bff9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: af_can: fix NULL pointer dereference in can_rcv_filter
Analogue to commit 8aa59e355949 ("can: af_can: fix NULL pointer dereference in can_rx_register()") we need to check for a missing initialization of ml_priv in the receive path of CAN frames.
Since commit 4e096a18867a ("net: introduce CAN specific pointer in the struct net_device") the check for dev->type to be ARPHRD_CAN is not sufficient anymore since bonding or tun netdevices claim to be CAN devices but do not initialize ml_priv accordingly.
From the CVE record · Linux
The Linux kernel CAN receive path can dereference a NULL pointer when a bonding or tun network device claims to be a CAN device but has not initialized ml_priv. The issue occurs while filtering received CAN frames; the input does not specify an attacker access requirement or user interaction.
Engineers running Linux kernels with CAN receive filtering should check their systems; affected versions are not specified.