================================================================== BUG: KASAN: use-after-free in lockdep_register_key+0x356/0x3e0 kernel/locking/lockdep.c:1182 Read of size 8 at addr ffff888028d1d2d8 by task syz-executor.1/7546 CPU: 0 PID: 7546 Comm: syz-executor.1 Not tainted 5.9.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:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 lockdep_register_key+0x356/0x3e0 kernel/locking/lockdep.c:1182 htab_init_buckets kernel/bpf/hashtab.c:144 [inline] htab_map_alloc+0x6c5/0x14a0 kernel/bpf/hashtab.c:521 find_and_alloc_map kernel/bpf/syscall.c:122 [inline] map_create kernel/bpf/syscall.c:825 [inline] __do_sys_bpf+0xa80/0x5180 kernel/bpf/syscall.c:4381 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fdc27e5cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000001a00 RCX: 000000000045deb9 RDX: 0000000000000040 RSI: 0000000020000080 RDI: 0000000000000000 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffcfa7a58af R14: 00007fdc27e5d9c0 R15: 000000000118bf2c Allocated by task 19469: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc_node include/linux/slab.h:577 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:575 kvmalloc include/linux/mm.h:765 [inline] xt_alloc_table_info+0x3c/0xa0 net/netfilter/x_tables.c:1176 do_replace net/ipv4/netfilter/ip_tables.c:1124 [inline] do_ipt_set_ctl+0x500/0xb80 net/ipv4/netfilter/ip_tables.c:1627 nf_setsockopt+0x83/0xe0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x3c3/0x39f0 net/ipv4/ip_sockglue.c:1435 tcp_setsockopt+0x136/0x2590 net/ipv4/tcp.c:3336 __sys_setsockopt+0x2db/0x610 net/socket.c:2132 __do_sys_setsockopt net/socket.c:2143 [inline] __se_sys_setsockopt net/socket.c:2140 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2140 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2953 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3027 sctp_transport_destroy net/sctp/transport.c:167 [inline] sctp_transport_put+0x11d/0x180 net/sctp/transport.c:326 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1476 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1185 [inline] sctp_do_sm+0x147c/0x5120 net/sctp/sm_sideeffect.c:1156 sctp_endpoint_bh_rcv+0x3be/0x7e0 net/sctp/endpointola.c:395 sctp_inq_push+0x1da/0x270 net/sctp/inqueue.c:80 sctp_rcv+0xf4d/0x2e30 net/sctp/input.c:256 ip_protocol_deliver_rcu+0x5c/0x8a0 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x20a/0x370 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:301 [inline] NF_HOOK include/linux/netfilter.h:295 [inline] ip_local_deliver+0x1b3/0x200 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0x1da/0x2f0 net/ipv4/ip_input.c:428 NF_HOOK include/linux/netfilter.h:301 [inline] NF_HOOK include/linux/netfilter.h:295 [inline] ip_rcv+0xaa/0xd0 net/ipv4/ip_input.c:539 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5311 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5425 process_backlog+0x232/0x6c0 net/core/dev.c:6315 napi_poll net/core/dev.c:6759 [inline] net_rx_action+0x4dc/0x1100 net/core/dev.c:6829 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 The buggy address belongs to the object at ffff888028d1d000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 728 bytes inside of 1024-byte region [ffff888028d1d000, ffff888028d1d400) The buggy address belongs to the page: page:00000000ed824c6c refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888028d1c800 pfn:0x28d18 head:00000000ed824c6c order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea0000837608 ffffea000094a608 ffff888010041140 raw: ffff888028d1c800 0000000000100004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888028d1d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888028d1d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888028d1d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888028d1d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888028d1d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================