PT-2026-152552

CVE-2026-99672

·

Publicado

2026-11-20

·

Atualizado

2026-11-20

Descrição por

Pontuação
N/A
Não disponível

Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.

In the Linux kernel, the following vulnerability has been resolved:
can: protect the receive lists with a per-device lock
The receive lists of a CAN device are located in the device's can ml priv and travel with the device when it is moved to another network namespace. But they are protected by the per-netns rcvlists lock. So can rx unregister() needs dev net(dev) to pick the right lock and silently returns when the passed namespace does not match dev net(dev) anymore.
isotp release() and bcm release() leave their notifier list before they take any lock that serializes against the netdev notifier, which runs under RTNL. When the bound device is moved to another namespace in this window, the notifier skips the socket and the release path has to remove the filters itself. isotp release() passes the socket's namespace, which does not match dev net(dev) anymore. bcm rx unreg() passes dev net(dev), which can rx unregister() reads again for its check, so a namespace change between both reads makes the check fail as well. In both cases can rx unregister() silently returns. As can rx register() stores rcv->sk without a reference, the remaining receivers point to the freed socket (isotp) or the freed op (bcm):
BUG: KASAN: use-after-free in isotp rcv+0x1570/0x24d0 Read of size 1 at addr ffff888118130552 by task isotp ns uaf/578 can rcv filter+0x4af/0x8c0 can receive+0x28d/0x3c0 can rcv+0x2a9/0x310 netif receive skb one core+0x21a/0x260 process backlog+0x210/0x760
Besides this, the lists of a device are protected by the rcvlists lock of the namespace that is passed in. Callers which pass dev net(dev) read it at different times, so the same lists may be modified under the locks of different namespaces while the device is moved.
Taking RTNL in these release paths is no option: raw bind(), raw setsockopt() and raw release() already hold RTNL while adding and removing up to CAN RAW FILTER MAX filters per socket, which unprivileged users can trigger repeatedly and which makes RTNL a global bottleneck.
Instead fix the root cause and add a spinlock to struct can dev rcv lists, which protects the receive lists of a CAN device or the 'any' CAN device lists of a namespace. It is initialized in can set ml priv(), which is used by all CAN network devices. With this, can rx unregister() finds the subscription independently of the current namespace of the device. The protocols keep the device valid with their tracked references. The per-netns rcvlists lock only protects the receive list statistics anymore, and CAN RAW, CAN BCM and CAN ISOTP pass the namespace that has been used for can rx register().
So isotp release() and bcm release() now remove their filters correctly without RTNL, and raw release(), raw setsockopt(), raw bind() and isotp bind() do not need RTNL anymore and add and remove their filters under lock sock(). To serialize bind() with NETDEV UNREGISTER, bind() publishes the device inside the RCU section of its lookup, and raw notify() and isotp notify() recheck the bound device under lock sock(). As RTNL does not keep NETDEV DOWN out of bind() anymore, bind() checks IFF UP after publishing the bound device, with a barrier pair against raw notify() and isotp notify(), so a down transition during bind() is still reported with ENETDOWN.
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾