Fixed
Created: Jun 18, 2025
Updated: Sep 1, 2025
Resolved Date: Jun 19, 2025
Found In Version: 10.25.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Kernel
In the Linux kernel, the following vulnerability has been resolved:EOL][EOL]mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices[EOL][EOL]The driver only offloads neighbors that are constructed on top of net[EOL]devices registered by it or their uppers (which are all Ethernet). The[EOL]device supports GRE encapsulation and decapsulation of forwarded[EOL]traffic, but the driver will not offload dummy neighbors constructed on[EOL]top of GRE net devices as they are not uppers of its net devices:[EOL][EOL] # ip link add name gre1 up type gre tos inherit local 192.0.2.1 remote 198.51.100.1[EOL] # ip neigh add 0.0.0.0 lladdr 0.0.0.0 nud noarp dev gre1[EOL] $ ip neigh show dev gre1 nud noarp[EOL] 0.0.0.0 lladdr 0.0.0.0 NOARP[EOL][EOL](Note that the neighbor is not marked with 'offload')[EOL][EOL]When the driver is reloaded and the existing configuration is replayed,[EOL]the driver does not perform the same check regarding existing neighbors[EOL]and offloads the previously added one:[EOL][EOL] # devlink dev reload pci/0000:01:00.0[EOL] $ ip neigh show dev gre1 nud noarp[EOL] 0.0.0.0 lladdr 0.0.0.0 offload NOARP[EOL][EOL]If the neighbor is later deleted, the driver will ignore the[EOL]notification (given the GRE net device is not its upper) and will[EOL]therefore keep referencing freed memory, resulting in a use-after-free[EOL][1] when the net device is deleted:[EOL][EOL] # ip neigh del 0.0.0.0 lladdr 0.0.0.0 dev gre1[EOL] # ip link del dev gre1[EOL][EOL]Fix by skipping neighbor replay if the net device for which the replay[EOL]is performed is not our upper.[EOL][EOL][1][EOL]BUG: KASAN: slab-use-after-free in mlxsw_sp_neigh_entry_update+0x1ea/0x200[EOL]Read of size 8 at addr ffff888155b0e420 by task ip/2282[EOL][...][EOL]Call Trace:[EOL] <TASK>[EOL] dump_stack_lvl+0x6f/0xa0[EOL] print_address_description.constprop.0+0x6f/0x350[EOL] print_report+0x108/0x205[EOL] kasan_report+0xdf/0x110[EOL] mlxsw_sp_neigh_entry_update+0x1ea/0x200[EOL] mlxsw_sp_router_rif_gone_sync+0x2a8/0x440[EOL] mlxsw_sp_rif_destroy+0x1e9/0x750[EOL] mlxsw_sp_netdevice_ipip_ol_event+0x3c9/0xdc0[EOL] mlxsw_sp_router_netdevice_event+0x3ac/0x15e0[EOL] notifier_call_chain+0xca/0x150[EOL] call_netdevice_notifiers_info+0x7f/0x100[EOL] unregister_netdevice_many_notify+0xc8c/0x1d90[EOL] rtnl_dellink+0x34e/0xa50[EOL] rtnetlink_rcv_msg+0x6fb/0xb70[EOL] netlink_rcv_skb+0x131/0x360[EOL] netlink_unicast+0x426/0x710[EOL] netlink_sendmsg+0x75a/0xc20[EOL] __sock_sendmsg+0xc1/0x150[EOL] ____sys_sendmsg+0x5aa/0x7b0[EOL] ___sys_sendmsg+0xfc/0x180[EOL] __sys_sendmsg+0x121/0x1b0[EOL] do_syscall_64+0xbb/0x1d0[EOL] entry_SYSCALL_64_after_hwframe+0x4b/0x53
CREATE(Triage):(User=lchen-cn) [CVE-2025-38019 (https://nvd.nist.gov/vuln/detail/CVE-2025-38019)