Re: [PATCH net-next v2] netdevsim: reject port addition and clean up ports after a failed reload
From: Joas Antonio dos Santos
Date: Fri Oct 30 2026 - 13:24:10 EST
On Fri, Oct 30, 2026, Ömer Mete Kaya wrote:
> nsim_drv_port_add() does not check devlink_is_reload_failed(), so ports
> can be added via new_port after a failed reload.
I sent a fix for the same syzbot report a bit earlier, which only
deleted the leftover ports in nsim_dev_reload_destroy(). Rejecting
new_port once the reload has failed is the better fix, so please take
this one and drop mine.
I tested this patch on net/main (94cea342e891) on arm64 QEMU with KASAN,
running the syzbot C reproducer. Without a fix it hits the WARNING in
bpf_offload_dev_destroy() and then a slab-use-after-free in
devlink_bus_name() through the leftover netdev; with this patch there
is no warning or KASAN report in 3 runs.
Tested-by: Joas Antonio dos Santos <joasantonio108@xxxxxxxxx>