================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x34ac/0x49c0 kernel/locking/lockdep.c:3290 Read of size 8 at addr ffff88809ade7930 by task syz-executor.2/18924 CPU: 1 PID: 18924 Comm: syz-executor.2 Not tainted 4.19.109-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 __lock_acquire+0x34ac/0x49c0 kernel/locking/lockdep.c:3290 lock_acquire+0x170/0x400 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 xt_find_match net/netfilter/x_tables.c:189 [inline] xt_find_match+0xa1/0x270 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+0x1c8/0x45e 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+0x990/0xf48 net/sched/ematch.c:307 flow_change+0x408/0x1ca0 net/sched/cls_flow.c:439 tc_new_tfilter+0xa6b/0x1450 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x453/0xaf0 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:632 ___sys_sendmsg+0x803/0x920 net/socket.c:2115 __sys_sendmsg+0xec/0x1b0 net/socket.c:2153 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c849 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f93dcf68c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f93dcf696d4 RCX: 000000000045c849 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000076c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fa R14: 00000000004ccb28 R15: 000000000076c04c Allocated by task 1: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x14d/0x7a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kmalloc_array include/linux/slab.h:636 [inline] kcalloc include/linux/slab.h:648 [inline] xt_init+0x128/0x2a9 net/netfilter/x_tables.c:1902 do_one_initcall+0xf1/0x734 init/main.c:883 do_initcall_level init/main.c:951 [inline] do_initcalls init/main.c:959 [inline] do_basic_setup init/main.c:977 [inline] kernel_init_freeable+0x4c9/0x5bb init/main.c:1144 kernel_init+0xd/0x1c0 init/main.c:1061 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88809ade6700 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 560 bytes to the right of 4096-byte region [ffff88809ade6700, ffff88809ade7700) The buggy address belongs to the page: page:ffffea00026b7980 count:1 mapcount:0 mapping:ffff88812c3dcdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea00026b7908 ffffea00026b7a08 ffff88812c3dcdc0 raw: 0000000000000000 ffff88809ade6700 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809ade7800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809ade7880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809ade7900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809ade7980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809ade7a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================