CVE-2026-99673: can: replace ARPHRD_CAN type checks with can_get_ml_priv()

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

can: replace ARPHRDCAN type checks with cangetmlpriv()

Commit 4e096a18867a ("net: introduce CAN specific pointer in the struct netdevice") introduced an explicit way to assign the midlayer private pointer (dev->mlpriv) to named users like MLPRIVCAN. A valid pointer returned by cangetmlpriv() therefore identifies a real CAN device.

The referenced commit only converted the j1939 and proc code to this check, while the other parts of the CAN subsystem still rely on dev->type == ARPHRDCAN.

The TUNSETLINK ioctl allows a down TUN/TAP device to set its hardware type to ARPHRDCAN while dev->mlpriv remains NULL. Such a repurposed netdevice passes the ARPHRDCAN checks.

Commit 8aa59e355949 ("can: afcan: fix NULL pointer dereference in canrxregister()") already made canrxregister() reject such devices. But canrxunregister() still only checks dev->type and dereferences the NULL mlpriv when it walks the receive lists of the device.

CANISOTP reaches this path: isotpbind() ignores the return values of canrxregister() and binds the socket anyway. When the socket is released or the device is unregistered, isotprelease() and isotpnotify() remove the filters that have never been registered and trigger the NULL pointer dereference in canrxunregister(). This only requires owning a TUN/TAP device or CAPNETADMIN in an unprivileged user namespace.

Convert the remaining ARPHRDCAN checks in afcan, bcm, gw, isotp and raw to cangetmlpriv().

Affected Software

6 affected componentsFixes available
linux/kernel>=5.4.110<5.5
5.5
linux/kernel>=5.10.28<5.11
5.11
linux/kernel>=5.11.12<5.12
5.12
linux/kernel>=5.12.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.5
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.11
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.12
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5

Frequently Asked Questions

1

What conditions are needed to reach the NULL dereference?

A down TUN/TAP device must be changed to hardware type ARPHRD_CAN using the TUNSETLINK ioctl while its dev->ml_priv remains NULL. This lets the repurposed device pass checks that rely only on dev->type == ARPHRD_CAN.

2

Which code path can trigger the issue after such a device is created?

CAN_ISOTP can reach it because isotp_bind() ignores failures from can_rx_register() and still binds the socket. Releasing that socket or unregistering the device can then call can_rx_unregister(), which dereferences the NULL midlayer-private pointer.

3

Why does the existing can_rx_register() protection not prevent this issue?

can_rx_register() already rejects devices without a valid CAN midlayer-private pointer. However, can_rx_unregister() continued to validate only the ARPHRD_CAN hardware type, allowing it to operate on the repurposed TUN/TAP device despite its NULL dev->ml_priv.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203