================================================================== BUG: KASAN: slab-use-after-free in crc16+0xcf/0xe0 lib/crc16.c:58 Read of size 1 at addr ffff88807c990000 by task syz-executor.5/9514 CPU: 0 PID: 9514 Comm: syz-executor.5 Not tainted 6.2.0-next-20230222-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 crc16+0xcf/0xe0 lib/crc16.c:58 ext4_group_desc_csum+0x623/0x820 fs/ext4/super.c:3176 ext4_group_desc_csum_set+0xc7/0x1a0 fs/ext4/super.c:3199 ext4_mb_clear_bb fs/ext4/mballoc.c:6027 [inline] ext4_free_blocks+0x1049/0x2560 fs/ext4/mballoc.c:6173 ext4_remove_blocks fs/ext4/extents.c:2527 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2710 [inline] ext4_ext_remove_space+0x353d/0x4760 fs/ext4/extents.c:2958 ext4_ext_truncate+0x34b/0x400 fs/ext4/extents.c:4416 ext4_truncate+0x1033/0x1620 fs/ext4/inode.c:4342 ext4_evict_inode+0xc09/0x1c40 fs/ext4/inode.c:286 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput fs/inode.c:1774 [inline] iput+0x52b/0x8e0 fs/inode.c:1760 do_unlinkat+0x42e/0x670 fs/namei.c:4323 __do_sys_unlink fs/namei.c:4364 [inline] __se_sys_unlink fs/namei.c:4362 [inline] __x64_sys_unlink+0xca/0x110 fs/namei.c:4362 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f646048c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6461163168 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f64605abf80 RCX: 00007f646048c0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f64604e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffd078730f R14: 00007f6461163300 R15: 0000000000022000 Allocated by task 5128: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ____ip_mc_inc_group+0x26e/0xd30 net/ipv4/igmp.c:1449 __ip_mc_inc_group net/ipv4/igmp.c:1484 [inline] ip_mc_inc_group net/ipv4/igmp.c:1490 [inline] ip_mc_up+0x14f/0x3a0 net/ipv4/igmp.c:1789 inetdev_event+0xbed/0x1720 net/ipv4/devinet.c:1578 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] dev_open net/core/dev.c:1458 [inline] dev_open+0x13c/0x150 net/core/dev.c:1446 team_port_add drivers/net/team/team.c:1215 [inline] team_add_slave+0xa92/0x2130 drivers/net/team/team.c:1984 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2623 do_setlink+0x89e/0x3d30 net/core/rtnetlink.c:2826 __rtnl_newlink+0xd69/0x1840 net/core/rtnetlink.c:3623 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6174 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 __sys_sendto+0x23a/0x340 net/socket.c:2145 __do_sys_sendto net/socket.c:2157 [inline] __se_sys_sendto net/socket.c:2153 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2153 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5444: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] kmem_cache_free_bulk.part.0+0x20c/0x680 mm/slub.c:3905 kfree_bulk include/linux/slab.h:496 [inline] kvfree_rcu_bulk+0x3c2/0x4d0 kernel/rcu/tree.c:2926 kvfree_rcu_drain_ready kernel/rcu/tree.c:3084 [inline] kfree_rcu_monitor+0x402/0x10e0 kernel/rcu/tree.c:3102 process_one_work+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3316 ip_ma_put net/ipv4/igmp.c:171 [inline] ip_ma_put+0x110/0x170 net/ipv4/igmp.c:167 __ip_mc_dec_group+0x46a/0x570 net/ipv4/igmp.c:1694 inetdev_event+0x3a8/0x1720 net/ipv4/devinet.c:1589 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] dev_close_many+0x309/0x630 net/core/dev.c:1530 unregister_netdevice_many_notify+0x416/0x19f0 net/core/dev.c:10814 unregister_netdevice_many net/core/dev.c:10897 [inline] default_device_exit_batch+0x451/0x5b0 net/core/dev.c:11350 ops_exit_list+0x125/0x170 net/core/net_namespace.c:174 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:613 process_one_work+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88807c990000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff88807c990000, ffff88807c990100) The buggy address belongs to the physical page: page:ffffea0001f26400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c990 head:ffffea0001f26400 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441b40 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5128, tgid 5128 (syz-executor.1), ts 327895747644, free_ts 327402608324 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x11bb/0x2d50 mm/page_alloc.c:4339 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5605 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x28e/0x380 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x136/0x330 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1061 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ____ip_mc_inc_group+0x26e/0xd30 net/ipv4/igmp.c:1449 __ip_mc_inc_group net/ipv4/igmp.c:1484 [inline] ip_mc_inc_group net/ipv4/igmp.c:1490 [inline] ip_mc_up+0x14f/0x3a0 net/ipv4/igmp.c:1789 inetdev_event+0xbed/0x1720 net/ipv4/devinet.c:1578 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] dev_open net/core/dev.c:1458 [inline] dev_open+0x13c/0x150 net/core/dev.c:1446 team_port_add drivers/net/team/team.c:1215 [inline] team_add_slave+0xa92/0x2130 drivers/net/team/team.c:1984 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2623 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x4de/0x930 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3401 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3496 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2637 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x17c/0x330 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1061 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] dropmon_net_event+0x15a/0x350 net/core/drop_monitor.c:1568 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] register_netdevice+0xfb4/0x1640 net/core/dev.c:10077 veth_newlink+0x351/0x9c0 drivers/net/veth.c:1806 rtnl_newlink_create net/core/rtnetlink.c:3440 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3657 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6174 Memory state around the buggy address: ffff88807c98ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807c98ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807c990000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807c990080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807c990100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================