================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3c2f/0x5470 kernel/locking/lockdep.c:4897 Read of size 8 at addr ffff88802318ac40 by task syz-executor.5/29230 CPU: 0 PID: 29230 Comm: syz-executor.5 Not tainted 5.16.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __lock_acquire+0x3c2f/0x5470 kernel/locking/lockdep.c:4897 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 remove_wait_queue+0x1d/0x180 kernel/sched/wait.c:55 free_poll_entry fs/select.c:135 [inline] poll_freewait+0xd1/0x250 fs/select.c:144 do_sys_poll+0x9f3/0xeb0 fs/select.c:1016 __do_sys_ppoll fs/select.c:1121 [inline] __se_sys_ppoll fs/select.c:1101 [inline] __x64_sys_ppoll+0x210/0x280 fs/select.c:1101 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f6baf743fe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6bae056168 EFLAGS: 00000246 ORIG_RAX: 000000000000010f RAX: ffffffffffffffda RBX: 00007f6baf8571d0 RCX: 00007f6baf743fe9 RDX: 0000000020000100 RSI: 0000000000000001 RDI: 0000000020000540 RBP: 00007f6baf79e08d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc00669c4f R14: 00007f6bae056300 R15: 0000000000022000 Allocated by task 29227: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:581 [inline] psi_trigger_create.part.0+0x15e/0x7f0 kernel/sched/psi.c:1152 cgroup_pressure_write+0x17e/0x6e0 kernel/cgroup/cgroup.c:3647 cgroup_file_write+0x1de/0x760 kernel/cgroup/cgroup.c:3877 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2086 [inline] new_sync_write+0x431/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 29230: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x130/0x160 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:236 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3509 [inline] kfree+0xcb/0x280 mm/slub.c:4562 kref_put include/linux/kref.h:65 [inline] psi_trigger_poll.part.0+0x1fa/0x310 kernel/sched/psi.c:1294 cgroup_file_poll+0x8a/0xe0 kernel/cgroup/cgroup.c:3911 kernfs_fop_poll+0x14f/0x1e0 fs/kernfs/file.c:838 vfs_poll include/linux/poll.h:90 [inline] do_pollfd fs/select.c:873 [inline] do_poll fs/select.c:921 [inline] do_sys_poll+0x60a/0xeb0 fs/select.c:1015 __do_sys_ppoll fs/select.c:1121 [inline] __se_sys_ppoll fs/select.c:1101 [inline] __x64_sys_ppoll+0x210/0x280 fs/select.c:1101 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3026 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3106 neigh_parms_release net/core/neighbour.c:1706 [inline] neigh_parms_release+0x205/0x290 net/core/neighbour.c:1697 inetdev_destroy net/ipv4/devinet.c:327 [inline] inetdev_event+0xd30/0x15d0 net/ipv4/devinet.c:1600 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] unregister_netdevice_many+0x964/0x1850 net/core/dev.c:10415 ip_tunnel_delete_nets+0x39f/0x5b0 net/ipv4/ip_tunnel.c:1123 ops_exit_list+0x125/0x170 net/core/net_namespace.c:173 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:597 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3026 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3106 neigh_parms_release net/core/neighbour.c:1706 [inline] neigh_parms_release+0x205/0x290 net/core/neighbour.c:1697 inetdev_destroy net/ipv4/devinet.c:327 [inline] inetdev_event+0xd30/0x15d0 net/ipv4/devinet.c:1600 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] unregister_netdevice_many+0x964/0x1850 net/core/dev.c:10415 ip_tunnel_delete_nets+0x39f/0x5b0 net/ipv4/ip_tunnel.c:1123 ops_exit_list+0x125/0x170 net/core/net_namespace.c:173 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:597 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88802318ac00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 64 bytes inside of 192-byte region [ffff88802318ac00, ffff88802318acc0) The buggy address belongs to the page: page:ffffea00008c6280 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2318a flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001a92dc0 dead000000000004 ffff888010c41a00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 7952, ts 298746714576, free_ts 297263226709 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 __alloc_pages_node include/linux/gfp.h:572 [inline] alloc_slab_page mm/slub.c:1801 [inline] allocate_slab mm/slub.c:1944 [inline] new_slab+0xab/0x3b0 mm/slub.c:2004 ___slab_alloc+0x87c/0xe90 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] __kmalloc_node+0x2cb/0x390 mm/slub.c:4468 kmalloc_array_node include/linux/slab.h:677 [inline] kcalloc_node include/linux/slab.h:682 [inline] memcg_alloc_slab_cgroups+0x8b/0x140 mm/memcontrol.c:2834 memcg_slab_post_alloc_hook+0xa7/0x450 mm/slab.h:516 slab_post_alloc_hook mm/slab.h:739 [inline] slab_alloc_node mm/slub.c:3230 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x15c/0x3a0 mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:705 [inline] alloc_buffer_head+0x20/0x140 fs/buffer.c:3310 alloc_page_buffers+0x268/0x5f0 fs/buffer.c:832 create_empty_buffers+0x2c/0x800 fs/buffer.c:1560 ext4_block_write_begin+0xd1d/0x1140 fs/ext4/inode.c:1062 ext4_da_write_begin+0x3eb/0xad0 fs/ext4/inode.c:2949 generic_perform_write+0x205/0x510 mm/filemap.c:3687 ext4_buffered_write_iter+0x1a2/0x390 fs/ext4/file.c:268 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3404 __vunmap+0x798/0xc50 mm/vmalloc.c:2635 __vfree+0x3c/0xd0 mm/vmalloc.c:2683 vfree+0x5a/0x90 mm/vmalloc.c:2714 netlink_skb_destructor+0xc2/0x210 net/netlink/af_netlink.c:377 skb_release_head_state+0x9f/0x2a0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb net/core/skbuff.c:914 [inline] consume_skb+0x89/0x160 net/core/skbuff.c:908 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x541/0x7e0 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 sock_no_sendpage+0xf6/0x140 net/core/sock.c:3091 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3492 kernel_sendpage net/socket.c:3489 [inline] sock_sendpage+0xe5/0x140 net/socket.c:1007 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 Memory state around the buggy address: ffff88802318ab00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802318ab80: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802318ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802318ac80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802318ad00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================