syzbot


KASAN: slab-out-of-bounds Read in dev_deactivate_queue

Status: closed as invalid on 2025/03/17 11:07
Subsystems: net
[Documentation on labels]
First crash: 193d, last: 192d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in dev_deactivate_queue net 2 7 291d 362d 0/29 auto-obsoleted due to no activity on 2025/02/15 11:29

Sample crash report:
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
==================================================================
BUG: KASAN: slab-out-of-bounds in dev_deactivate_queue+0xb4/0x1b0 net/sched/sch_generic.c:1285
Read of size 8 at addr ffff8880306bd590 by task kworker/u8:10/8477

CPU: 0 UID: 0 PID: 8477 Comm: kworker/u8:10 Not tainted 6.14.0-rc3-syzkaller-00012-g2408a807bfc3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:489
 kasan_report+0x143/0x180 mm/kasan/report.c:602
 dev_deactivate_queue+0xb4/0x1b0 net/sched/sch_generic.c:1285
 netdev_for_each_tx_queue include/linux/netdevice.h:2590 [inline]
 dev_deactivate_many+0x14a/0xc90 net/sched/sch_generic.c:1361
 __dev_close_many+0x1a4/0x350 net/core/dev.c:1675
 dev_close_many+0x24e/0x4c0 net/core/dev.c:1713
 unregister_netdevice_many_notify+0x52d/0x1f10 net/core/dev.c:11774
 cleanup_net+0x76d/0xd60 net/core/net_namespace.c:647
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3317
 worker_thread+0x870/0xd30 kernel/workqueue.c:3398
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Allocated by task 14044:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
 poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
 __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
 kasan_kmalloc include/linux/kasan.h:260 [inline]
 __do_kmalloc_node mm/slub.c:4294 [inline]
 __kmalloc_node_noprof+0x290/0x4d0 mm/slub.c:4300
 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:662
 netif_alloc_netdev_queues net/core/dev.c:10658 [inline]
 alloc_netdev_mqs+0x92d/0x1210 net/core/dev.c:11530
 rtnl_create_link+0x2f9/0xc90 net/core/rtnetlink.c:3605
 rtnl_newlink_create+0x210/0xa40 net/core/rtnetlink.c:3781
 __rtnl_newlink net/core/rtnetlink.c:3907 [inline]
 rtnl_newlink+0x17cc/0x1d30 net/core/rtnetlink.c:4022
 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912
 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543
 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline]
 netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348
 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:733
 __sys_sendto+0x363/0x4c0 net/socket.c:2187
 __do_sys_sendto net/socket.c:2194 [inline]
 __se_sys_sendto net/socket.c:2190 [inline]
 __x64_sys_sendto+0xde/0x100 net/socket.c:2190
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8880306bd400
 which belongs to the cache kmalloc-cg-512 of size 512
The buggy address is located 16 bytes to the right of
 allocated 384-byte region [ffff8880306bd400, ffff8880306bd580)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880306bf400 pfn:0x306bc
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88807e0abe01
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88801b04f140 ffffea0000d29b10 ffffea00009bfa10
raw: ffff8880306bf400 000000000010000a 00000000f5000000 ffff88807e0abe01
head: 00fff00000000240 ffff88801b04f140 ffffea0000d29b10 ffffea00009bfa10
head: ffff8880306bf400 000000000010000a 00000000f5000000 ffff88807e0abe01
head: 00fff00000000002 ffffea0000c1af01 ffffffffffffffff 0000000000000000
head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5209, tgid 5209 (udevd), ts 33037130615, free_ts 29896345530
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551
 prep_new_page mm/page_alloc.c:1559 [inline]
 get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477
 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739
 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270
 alloc_slab_page mm/slub.c:2423 [inline]
 allocate_slab+0x8f/0x3a0 mm/slub.c:2587
 new_slab mm/slub.c:2640 [inline]
 ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826
 __slab_alloc+0x58/0xa0 mm/slub.c:3916
 __slab_alloc_node mm/slub.c:3991 [inline]
 slab_alloc_node mm/slub.c:4152 [inline]
 __do_kmalloc_node mm/slub.c:4293 [inline]
 __kmalloc_node_track_caller_noprof+0x2e9/0x4c0 mm/slub.c:4313
 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:609
 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:678
 alloc_skb include/linux/skbuff.h:1331 [inline]
 alloc_skb_with_frags+0xc3/0x820 net/core/skbuff.c:6612
 sock_alloc_send_pskb+0x91a/0xa60 net/core/sock.c:2897
 unix_dgram_sendmsg+0x5e8/0x1df0 net/unix/af_unix.c:2017
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:733
 sock_write_iter+0x2d7/0x3f0 net/socket.c:1137
 new_sync_write fs/read_write.c:586 [inline]
 vfs_write+0xacf/0xd10 fs/read_write.c:679
page last free pid 5201 tgid 5201 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1127 [inline]
 free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660
 __slab_free+0x2c2/0x380 mm/slub.c:4520
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:250 [inline]
 slab_post_alloc_hook mm/slub.c:4115 [inline]
 slab_alloc_node mm/slub.c:4164 [inline]
 kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4171
 vm_area_dup+0x27/0x290 kernel/fork.c:487
 dup_mmap kernel/fork.c:694 [inline]
 dup_mm kernel/fork.c:1700 [inline]
 copy_mm+0xcd6/0x2160 kernel/fork.c:1752
 copy_process+0x17d1/0x3cf0 kernel/fork.c:2403
 kernel_clone+0x223/0x870 kernel/fork.c:2815
 __do_sys_clone kernel/fork.c:2958 [inline]
 __se_sys_clone kernel/fork.c:2942 [inline]
 __x64_sys_clone+0x267/0x2e0 kernel/fork.c:2942
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8880306bd480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880306bd500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880306bd580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                         ^
 ffff8880306bd600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880306bd680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/17 20:43 upstream 2408a807bfc3 9be4ace3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in dev_deactivate_queue
2025/02/16 18:13 upstream ad1b832bf1cf 40a34ec9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in dev_deactivate_queue
* Struck through repros no longer work on HEAD.