In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: avoid invalid read in irdma_net_event
irdma_net_event() should not dereference anything from "neigh" (alias
"ptr") until it has checked that the event is NETEVENT_NEIGH_UPDATE.
Other events come with different structures pointed to by "ptr" and they
may be smaller than struct neighbour.
Move the read of neigh->dev under the NETEVENT_NEIGH_UPDATE case.
The bug is mostly harmless, but it triggers KASAN on debug kernels:
BUG: KASAN: stack-out-of-bounds in irdma_net_event+0x32e/0x3b0 [irdma]Read of size 8 at addr ffffc900075e07f0 by task kworker/27:2/542554
CPU: 27 PID: 542554 Comm: kworker/27:2 Kdump: loaded Not tainted 5.14.0-630.el9.x86_64+debug #1
Hardware name: [...]
Workqueue: events rt6_probe_deferred
Call Trace:<IRQ>dump_stack_lvl+0x60/0xb0print_address_description.constprop.0+0x2c/0x3f0print_report+0xb4/0x270kasan_report+0x92/0xc0irdma_net_event+0x32e/0x3b0 [irdma]notifier_call_chain+0x9e/0x180atomic_notifier_call_chain+0x5c/0x110rt6_do_redirect+0xb91/0x1080tcp_v6_err+0xe9b/0x13e0icmpv6_notify+0x2b2/0x630ndisc_redirect_rcv+0x328/0x530icmpv6_rcv+0xc16/0x1360ip6_protocol_deliver_rcu+0xb84/0x12e0ip6_input_finish+0x117/0x240ip6_input+0xc4/0x370ipv6_rcv+0x420/0x7d0__netif_receive_skb_one_core+0x118/0x1b0process_backlog+0xd1/0x5d0__napi_poll.constprop.0+0xa3/0x440net_rx_action+0x78a/0xba0handle_softirqs+0x2d4/0x9c0do_softirq+0xad/0xe0</IRQ>