Linux CAN drivers development
 help / color / mirror / Atom feed
* [bug report] Potential order bug in 'drivers/net/can/vxcan.c', primarily in 'vxcan_dellink()'
@ 2026-04-24 15:24 Ginger
  2026-04-24 18:30 ` Oliver Hartkopp
  0 siblings, 1 reply; 2+ messages in thread
From: Ginger @ 2026-04-24 15:24 UTC (permalink / raw)
  To: mkl; +Cc: linux-can, linux-kernel

Dear Linux kernel maintainers,

My research-based static analyzer found a potential order bug within
the ' drivers/net/can' subsystem, more specifically, in '
drivers/net/can/vxcan.c'.

Kernel version: long-term kernel v6.18.9

Potential issue:
T0:
vxcan_dellink
    --> RCU_INIT_POINTER(priv->peer, NULL);
    --> unregister_netdevice_queue(dev, head);

In T0, the priv->peer field is nullified before the device is
unregistered from the kernel in 'unregister_netdevice_queue()'.
Considering that many other kernel functions rely on the existence of
the netdev and dereferences 'priv->peer', e.g., vxcan_open() and
vxcan_xmit(), it is possible to cause null pointer deref in concurrent
executions.

Thank you for your time and consideration.

Sincerely,
Ginger

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-24 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24 15:24 [bug report] Potential order bug in 'drivers/net/can/vxcan.c', primarily in 'vxcan_dellink()' Ginger
2026-04-24 18:30 ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox