================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff8880a4cd41e0 by task syz-executor.3/30834 CPU: 0 PID: 30834 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 xt_find_match net/netfilter/x_tables.c:189 [inline] xt_find_match+0xa3/0x280 net/netfilter/x_tables.c:181 xt_request_find_match net/netfilter/x_tables.c:219 [inline] xt_request_find_match+0x88/0x110 net/netfilter/x_tables.c:212 get_xt_match net/sched/em_ipt.c:112 [inline] em_ipt_change+0x1c7/0x470 net/sched/em_ipt.c:132 tcf_em_validate net/sched/ematch.c:248 [inline] tcf_em_tree_validate net/sched/ematch.c:365 [inline] tcf_em_tree_validate+0x8fa/0xea0 net/sched/ematch.c:307 basic_set_parms net/sched/cls_basic.c:155 [inline] basic_change+0x1173/0x1260 net/sched/cls_basic.c:212 tc_new_tfilter+0xb52/0x16c0 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f29ad858109 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f29ac1cd168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f29ad96af60 RCX: 00007f29ad858109 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 00007f29ad8b205d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff6a77509f R14: 00007f29ac1cd300 R15: 0000000000022000 Allocated by task 8153: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 kmem_cache_zalloc include/linux/slab.h:699 [inline] __alloc_file+0x21/0x340 fs/file_table.c:100 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 alloc_file+0x5e/0x4d0 fs/file_table.c:192 alloc_file_pseudo+0x165/0x250 fs/file_table.c:231 sock_alloc_file+0x48/0x180 net/socket.c:406 sock_map_fd net/socket.c:429 [inline] __sys_socket+0x13d/0x200 net/socket.c:1462 __do_sys_socket net/socket.c:1467 [inline] __se_sys_socket net/socket.c:1465 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1465 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a4cd4080 which belongs to the cache filp of size 456 The buggy address is located 352 bytes inside of 456-byte region [ffff8880a4cd4080, ffff8880a4cd4248) The buggy address belongs to the page: page:ffffea0002933500 count:1 mapcount:0 mapping:ffff88813be45080 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002be0cc8 ffffea0002a76bc8 ffff88813be45080 raw: 0000000000000000 ffff8880a4cd4080 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4cd4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4cd4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a4cd4180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a4cd4200: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ffff8880a4cd4280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================