================================================================== 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:282 [inline] BUG: KASAN: use-after-free in waitqueue_active include/linux/wait.h:127 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:161 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2141 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x613/0x640 net/core/sock.c:2835 Read of size 8 at addr ffff8880151f5b00 by task syz-executor.0/2673 CPU: 3 PID: 2673 Comm: syz-executor.0 Not tainted 5.7.0-rc6-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 __read_once_size include/linux/compiler.h:199 [inline] list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:127 [inline] wq_has_sleeper include/linux/wait.h:161 [inline] skwq_has_sleeper include/net/sock.h:2141 [inline] sock_def_write_space+0x613/0x640 net/core/sock.c:2835 sock_wfree+0x1cc/0x240 net/core/sock.c:1969 skb_release_head_state+0xe2/0x250 net/core/skbuff.c:651 skb_release_all+0x11/0x60 net/core/skbuff.c:662 __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xf3/0x400 net/core/skbuff.c:831 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:3022 dev_consume_skb_any include/linux/netdevice.h:3707 [inline] napi_consume_skb+0x40d/0x5c0 net/core/skbuff.c:901 free_old_xmit_skbs+0xd6/0x230 drivers/net/virtio_net.c:1380 start_xmit+0x11f/0x1590 drivers/net/virtio_net.c:1576 __netdev_start_xmit include/linux/netdevice.h:4533 [inline] netdev_start_xmit include/linux/netdevice.h:4547 [inline] xmit_one net/core/dev.c:3477 [inline] dev_hard_start_xmit+0x1a4/0x9b0 net/core/dev.c:3493 sch_direct_xmit+0x345/0xc20 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4d1/0x17b0 net/sched/sch_generic.c:384 qdisc_run include/net/pkt_sched.h:134 [inline] qdisc_run include/net/pkt_sched.h:126 [inline] __dev_xmit_skb net/core/dev.c:3668 [inline] __dev_queue_xmit+0x2115/0x30a0 net/core/dev.c:4021 llc_sap_action_send_xid_c+0x315/0x400 net/llc/llc_s_ac.c:88 llc_exec_sap_trans_actions net/llc/llc_sap.c:152 [inline] llc_sap_next_state net/llc/llc_sap.c:181 [inline] llc_sap_state_process+0x21c/0x4d0 net/llc/llc_sap.c:208 llc_ui_sendmsg+0x9ec/0x1000 net/llc/af_llc.c:960 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x308/0x7e0 net/socket.c:2362 ___sys_sendmsg+0x100/0x170 net/socket.c:2416 __sys_sendmmsg+0x195/0x480 net/socket.c:2506 __do_sys_sendmmsg net/socket.c:2535 [inline] __se_sys_sendmmsg net/socket.c:2532 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2532 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c819 Code: 1d b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 eb b1 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0f4f83fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 000000000074bf00 RCX: 000000000045c819 RDX: 03fffffffffffeed RSI: 0000000020001380 RDI: 0000000000000004 RBP: 0000000000710d00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0f4f8406d4 R13: 00000000000008dd R14: 00000000006ed5c0 R15: 00000000004b2720 Allocated by task 2641: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x11b/0x740 mm/slab.c:3484 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x1e0 fs/inode.c:232 new_inode_pseudo+0x14/0xe0 fs/inode.c:928 sock_alloc+0x3c/0x260 net/socket.c:573 __sock_create+0xba/0x730 net/socket.c:1397 sock_create net/socket.c:1484 [inline] __sys_socket+0xef/0x200 net/socket.c:1526 __do_sys_socket net/socket.c:1535 [inline] __se_sys_socket net/socket.c:1533 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1533 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 2673: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x7f/0x320 mm/slab.c:3694 i_callback+0x3f/0x70 fs/inode.c:221 rcu_do_batch kernel/rcu/tree.c:2206 [inline] rcu_core+0x59f/0x1370 kernel/rcu/tree.c:2433 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880151f5a80 which belongs to the cache sock_inode_cache(17:syz0) of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff8880151f5a80, ffff8880151f5f40) The buggy address belongs to the page: page:ffffea0000547d40 refcount:1 mapcount:0 mapping:000000007ea999c2 index:0xffff8880151f5ffd flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0000543a48 ffffea000056c188 ffff888020aa5380 raw: ffff8880151f5ffd ffff8880151f5000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880151f5a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880151f5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880151f5b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880151f5b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880151f5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================