syzbot


KASAN: use-after-free Read in br_switchdev_fdb_notify

Status: upstream: reported on 2025/12/04 12:44
Reported-by: syzbot+40ee65725b8d520813cb@syzkaller.appspotmail.com
First crash: 57d, last: 57d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in br_switchdev_fdb_notify bridge 19 2 239d 246d 0/29 auto-obsoleted due to no activity on 2025/09/02 15:50
upstream KASAN: slab-use-after-free Read in br_switchdev_fdb_notify (2) bridge 19 4 95d 111d 29/29 fixed on 2026/01/22 13:50
upstream general protection fault in br_switchdev_fdb_notify bridge 2 C error 82 1637d 1642d 20/29 fixed on 2021/11/10 00:50

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in br_switchdev_fdb_populate net/bridge/br_switchdev.c:142 [inline]
BUG: KASAN: use-after-free in br_switchdev_fdb_notify+0x2ad/0x380 net/bridge/br_switchdev.c:163
Read of size 8 at addr ffff8880575f5808 by task kworker/1:3/4256

CPU: 1 PID: 4256 Comm: kworker/1:3 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: events_long br_fdb_cleanup
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 br_switchdev_fdb_populate net/bridge/br_switchdev.c:142 [inline]
 br_switchdev_fdb_notify+0x2ad/0x380 net/bridge/br_switchdev.c:163
 fdb_notify+0x89/0x160 net/bridge/br_fdb.c:189
 fdb_delete+0xd52/0x10f0 net/bridge/br_fdb.c:325
 br_fdb_cleanup+0x2a3/0x4c0 net/bridge/br_fdb.c:550
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Allocated by task 0:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc_node_track_caller+0xae/0x230 mm/slab_common.c:956
 kmalloc_reserve net/core/skbuff.c:446 [inline]
 __alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515
 alloc_skb include/linux/skbuff.h:1271 [inline]
 __tcp_send_ack+0x9d/0x5a0 net/ipv4/tcp_output.c:4033
 tcp_ack_snd_check net/ipv4/tcp_input.c:5672 [inline]
 tcp_rcv_established+0xeb6/0x1d30 net/ipv4/tcp_input.c:6116
 tcp_v4_do_rcv+0x48d/0xb00 net/ipv4/tcp_ipv4.c:1683
 tcp_v4_rcv+0x2789/0x2e30 net/ipv4/tcp_ipv4.c:2114
 ip_protocol_deliver_rcu+0x3ad/0x780 net/ipv4/ip_input.c:205
 ip_local_deliver_finish+0x2c7/0x510 net/ipv4/ip_input.c:233
 NF_HOOK+0x2ff/0x390 include/linux/netfilter.h:302
 dst_input include/net/dst.h:463 [inline]
 ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline]
 ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline]
 ip_sublist_rcv+0xa30/0xd10 net/ipv4/ip_input.c:639
 ip_list_rcv+0x3df/0x430 net/ipv4/ip_input.c:674
 __netif_receive_skb_list_ptype net/core/dev.c:5624 [inline]
 __netif_receive_skb_list_core+0x574/0x740 net/core/dev.c:5672
 __netif_receive_skb_list net/core/dev.c:5724 [inline]
 netif_receive_skb_list_internal+0x90f/0xc50 net/core/dev.c:5815
 gro_normal_list include/net/gro.h:433 [inline]
 napi_complete_done+0x37d/0x830 net/core/dev.c:6156
 virtqueue_napi_complete drivers/net/virtio_net.c:403 [inline]
 virtnet_poll+0x991/0x1150 drivers/net/virtio_net.c:1717
 __napi_poll+0xc0/0x460 net/core/dev.c:6590
 napi_poll net/core/dev.c:6657 [inline]
 net_rx_action+0x5b1/0xad0 net/core/dev.c:6771
 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
 __do_softirq kernel/softirq.c:630 [inline]
 invoke_softirq kernel/softirq.c:470 [inline]
 __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
 common_interrupt+0xb5/0xd0 arch/x86/kernel/irq.c:242
 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682

Freed by task 32:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
 skb_free_head net/core/skbuff.c:762 [inline]
 skb_release_data+0x5db/0x7c0 net/core/skbuff.c:791
 skb_release_all net/core/skbuff.c:856 [inline]
 napi_consume_skb+0x12f/0x1d0 net/core/skbuff.c:1113
 free_old_xmit_skbs+0x111/0x2a0 drivers/net/virtio_net.c:1639
 virtnet_poll_tx+0x20f/0x520 drivers/net/virtio_net.c:1811
 __napi_poll+0xc0/0x460 net/core/dev.c:6590
 napi_poll net/core/dev.c:6657 [inline]
 net_rx_action+0x5b1/0xad0 net/core/dev.c:6771
 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
 __do_softirq kernel/softirq.c:630 [inline]
 invoke_softirq kernel/softirq.c:470 [inline]
 __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
 common_interrupt+0xb5/0xd0 arch/x86/kernel/irq.c:242
 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 call_rcu+0x154/0x980 kernel/rcu/tree.c:2849
 br_del_if+0x15d/0x330 net/bridge/br_if.c:739
 do_set_master net/core/rtnetlink.c:2616 [inline]
 do_setlink+0xe3c/0x3c40 net/core/rtnetlink.c:2840
 rtnl_group_changelink net/core/rtnetlink.c:3361 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3618 [inline]
 rtnl_newlink+0x10a3/0x1ff0 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2511
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1872
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x59b/0x970 net/socket.c:2519
 ___sys_sendmsg+0x21c/0x290 net/socket.c:2573
 __sys_sendmsg net/socket.c:2602 [inline]
 __do_sys_sendmsg net/socket.c:2611 [inline]
 __se_sys_sendmsg+0x19e/0x270 net/socket.c:2609
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff8880575f5800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 8 bytes inside of
 1024-byte region [ffff8880575f5800, ffff8880575f5c00)

The buggy address belongs to the physical page:
page:ffffea00015d7c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x575f0
head:ffffea00015d7c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017441dc0
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4273, tgid 4273 (syz-executor), ts 79282216194, free_ts 22688754025
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
 prep_new_page mm/page_alloc.c:2539 [inline]
 get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
 alloc_slab_page+0x5d/0x160 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2c0 mm/slub.c:1997
 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa0/0x240 mm/slab_common.c:949
 kmalloc_array include/linux/slab.h:615 [inline]
 batadv_hash_new+0x77/0x290 net/batman-adv/hash.c:52
 batadv_bla_init+0x44b/0x6f0 net/batman-adv/bridge_loop_avoidance.c:1563
 batadv_mesh_init+0x3d8/0x700 net/batman-adv/main.c:211
 batadv_softif_init_late+0x9b6/0xe50 net/batman-adv/soft-interface.c:810
 register_netdevice+0x65b/0x1aa0 net/core/dev.c:10130
 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3642 [inline]
 rtnl_newlink+0x14c4/0x1ff0 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2511
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1459 [inline]
 free_pcp_prepare mm/page_alloc.c:1509 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
 free_contig_range+0x9d/0x150 mm/page_alloc.c:9574
 destroy_args+0x100/0xa31 mm/debug_vm_pgtable.c:1031
 debug_vm_pgtable+0x32a/0x37e mm/debug_vm_pgtable.c:1359
 do_one_initcall+0x214/0x7a0 init/main.c:1310
 do_initcall_level+0x137/0x1e4 init/main.c:1383
 do_initcalls+0x4b/0x8a init/main.c:1399
 kernel_init_freeable+0x3fa/0x5ac init/main.c:1638
 kernel_init+0x19/0x1b0 init/main.c:1526
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
 ffff8880575f5700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880575f5780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880575f5800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff8880575f5880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880575f5900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/04 12:44 linux-6.1.y f6e38ae624cf d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in br_switchdev_fdb_notify
* Struck through repros no longer work on HEAD.