AZL-115489: CVE-2026-99673 affecting package kernel 6.6.161.1-1
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().