================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in list_empty include/linux/list.h:268 [inline] BUG: KASAN: use-after-free in waitqueue_active include/linux/wait.h:126 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:160 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2088 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x651/0x680 net/core/sock.c:2811 Read of size 8 at addr ffff888095dbba78 by task kworker/u4:9/8910 CPU: 1 PID: 8910 Comm: kworker/u4:9 Not tainted 5.4.0-rc1+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:199 [inline] list_empty include/linux/list.h:268 [inline] waitqueue_active include/linux/wait.h:126 [inline] wq_has_sleeper include/linux/wait.h:160 [inline] skwq_has_sleeper include/net/sock.h:2088 [inline] sock_def_write_space+0x651/0x680 net/core/sock.c:2811 sock_wfree+0x150/0x190 net/core/sock.c:1958 skb_release_head_state+0xeb/0x260 net/core/skbuff.c:652 skb_release_all+0x16/0x60 net/core/skbuff.c:663 _kfree_skb_defer net/core/skbuff.c:873 [inline] napi_consume_skb+0x19d/0x580 net/core/skbuff.c:918 free_old_xmit_skbs+0xee/0x250 drivers/net/virtio_net.c:1366 virtnet_poll_tx+0x214/0x3a0 drivers/net/virtio_net.c:1493 napi_poll net/core/dev.c:6392 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6460 __do_softirq+0x262/0x98c kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq.part.0+0x11a/0x170 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x211/0x270 kernel/softirq.c:189 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x31/0x40 kernel/locking/spinlock.c:207 spin_unlock_bh include/linux/spinlock.h:383 [inline] batadv_nc_purge_paths+0x265/0x370 net/batman-adv/network-coding.c:470 batadv_nc_worker+0x29c/0x760 net/batman-adv/network-coding.c:719 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 13109: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:518 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3483 sock_alloc_inode+0x1c/0x1d0 net/socket.c:239 alloc_inode+0x68/0x1e0 fs/inode.c:230 new_inode_pseudo+0x19/0xf0 fs/inode.c:919 sock_alloc+0x41/0x270 net/socket.c:558 __sock_create+0xc2/0x730 net/socket.c:1382 sock_create net/socket.c:1469 [inline] __sys_socket+0x103/0x220 net/socket.c:1511 __do_sys_socket net/socket.c:1520 [inline] __se_sys_socket net/socket.c:1518 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1518 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3693 sock_free_inode+0x20/0x30 net/socket.c:260 i_callback+0x44/0x80 fs/inode.c:219 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2157 [inline] rcu_core+0x581/0x1560 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff888095dbba00 which belongs to the cache sock_inode_cache(65:syz3) of size 1152 The buggy address is located 120 bytes inside of 1152-byte region [ffff888095dbba00, ffff888095dbbe80) The buggy address belongs to the page: page:ffffea0002576ec0 refcount:1 mapcount:0 mapping:ffff88809a59d540 index:0xffff888095dbbffd flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00028b9b48 ffffea0002576748 ffff88809a59d540 raw: ffff888095dbbffd ffff888095dbb000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888095dbb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888095dbb980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888095dbba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888095dbba80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888095dbbb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================