[v6.1] KASAN: use-after-free Read in br_multicast_add_router

0 views
Skip to first unread message

syzbot

unread,
Jun 4, 2026, 7:26:21 PM (2 days ago) Jun 4
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 228da13e907e Linux 6.1.175
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14acd76a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=29caf4bae4b0566f
dashboard link: https://syzkaller.appspot.com/bug?extid=ced2169ba45b89f1e027
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bf27a408696a/disk-228da13e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/264d4943ab43/vmlinux-228da13e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a499b0d2a133/Image-228da13e.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ced216...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in br_multicast_rport_from_node net/bridge/br_multicast.c:3124 [inline]
BUG: KASAN: use-after-free in br_multicast_get_rport_slot net/bridge/br_multicast.c:3138 [inline]
BUG: KASAN: use-after-free in br_multicast_add_router+0x124/0x460 net/bridge/br_multicast.c:3176
Read of size 8 at addr ffff0000d6f821b0 by task syz.3.1652/8867

CPU: 0 PID: 8867 Comm: syz.3.1652 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call trace:
dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
print_address_description+0x88/0x218 mm/kasan/report.c:316
print_report+0x50/0x68 mm/kasan/report.c:420
kasan_report+0xa8/0xfc mm/kasan/report.c:524
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
br_multicast_rport_from_node net/bridge/br_multicast.c:3124 [inline]
br_multicast_get_rport_slot net/bridge/br_multicast.c:3138 [inline]
br_multicast_add_router+0x124/0x460 net/bridge/br_multicast.c:3176
br_ip4_multicast_add_router net/bridge/br_multicast.c:3200 [inline]
br_multicast_set_port_router+0x3f0/0x9e0 net/bridge/br_multicast.c:4387
br_setport+0xa20/0xf54 net/bridge/br_netlink.c:986
br_port_slave_changelink+0x138/0x160 net/bridge/br_netlink.c:1159
__rtnl_newlink net/core/rtnetlink.c:3607 [inline]
rtnl_newlink+0x10b0/0x1a54 net/core/rtnetlink.c:3661
rtnetlink_rcv_msg+0x698/0xcdc net/core/rtnetlink.c:6158
netlink_rcv_skb+0x218/0x3e8 net/netlink/af_netlink.c:2511
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6176
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Allocated by task 5138:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:384
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:936 [inline]
__kmalloc+0xec/0x178 mm/slab_common.c:949
kmalloc include/linux/slab.h:568 [inline]
kzalloc include/linux/slab.h:699 [inline]
ieee802_11_parse_elems_full+0xa4/0xe3c net/mac80211/util.c:1503
ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2265 [inline]
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2272 [inline]
ieee80211_bss_info_update+0x6f8/0xa9c net/mac80211/scan.c:212
ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
ieee80211_ibss_rx_queued_mgmt+0x1438/0x25c4 net/mac80211/ibss.c:1638
ieee80211_iface_process_skb net/mac80211/iface.c:1679 [inline]
ieee80211_iface_work+0x598/0xa34 net/mac80211/iface.c:1733
cfg80211_wiphy_work+0x1d8/0x218 net/wireless/core.c:433
process_one_work+0x7f8/0x13a4 kernel/workqueue.c:2292
worker_thread+0x8c4/0xfec kernel/workqueue.c:2439
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850

Freed by task 5138:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:245
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xbc/0x218 mm/slub.c:3700
kfree+0xd0/0x1a8 mm/slab_common.c:988
ieee80211_bss_info_update+0x790/0xa9c net/mac80211/scan.c:223
ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
ieee80211_ibss_rx_queued_mgmt+0x1438/0x25c4 net/mac80211/ibss.c:1638
ieee80211_iface_process_skb net/mac80211/iface.c:1679 [inline]
ieee80211_iface_work+0x598/0xa34 net/mac80211/iface.c:1733
cfg80211_wiphy_work+0x1d8/0x218 net/wireless/core.c:433
process_one_work+0x7f8/0x13a4 kernel/workqueue.c:2292
worker_thread+0x8c4/0xfec kernel/workqueue.c:2439
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850

Last potentially related work creation:
kasan_save_stack+0x40/0x70 mm/kasan/common.c:46
__kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
call_rcu+0x100/0x94c kernel/rcu/tree.c:2849
del_nbp+0x814/0x904 net/bridge/br_if.c:376
br_del_if+0x154/0x320 net/bridge/br_if.c:740
br_del_slave+0x28/0x38 net/bridge/br_device.c:395
do_set_master net/core/rtnetlink.c:2620 [inline]
do_setlink+0xc28/0x3434 net/core/rtnetlink.c:2844
__rtnl_newlink net/core/rtnetlink.c:3614 [inline]
rtnl_newlink+0x13c8/0x1a54 net/core/rtnetlink.c:3661
rtnetlink_rcv_msg+0x698/0xcdc net/core/rtnetlink.c:6158
netlink_rcv_skb+0x218/0x3e8 net/netlink/af_netlink.c:2511
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6176
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Second to last potentially related work creation:
kasan_save_stack+0x40/0x70 mm/kasan/common.c:46
__kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
kvfree_call_rcu+0xb4/0x6e8 kernel/rcu/tree.c:3405
net_assign_generic net/core/net_namespace.c:117 [inline]
ops_init+0x23c/0x53c net/core/net_namespace.c:132
__register_pernet_operations net/core/net_namespace.c:1209 [inline]
register_pernet_operations+0x24c/0x538 net/core/net_namespace.c:1282
register_pernet_device+0x3c/0x9c net/core/net_namespace.c:1369
kcm_init+0x128/0x1b4 net/kcm/kcmsock.c:2027
do_one_initcall+0x278/0x9e0 init/main.c:1309
do_initcall_level+0x154/0x214 init/main.c:1382
do_initcalls+0x58/0xac init/main.c:1398
do_basic_setup+0x8c/0xa0 init/main.c:1417
kernel_init_freeable+0x35c/0x4f0 init/main.c:1637
kernel_init+0x24/0x1d8 init/main.c:1525
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850

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

The buggy address belongs to the physical page:
page:0000000050755ad9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116f80
head:0000000050755ad9 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 fffffc0003596a00 dead000000000002 ffff0000c0002780
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff0000d6f82080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d6f82100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000d6f82180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000d6f82200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d6f82280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
bridge0: port 2(bridge_slave_1) entered disabled state


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages