================================================================== BUG: KASAN: slab-use-after-free in lockdep_register_key+0x253/0x3f0 kernel/locking/lockdep.c:1225 Read of size 8 at addr ffff88801c701298 by task syz-executor.2/6703 CPU: 1 PID: 6703 Comm: syz-executor.2 Not tainted 6.9.0-rc5-syzkaller-01461-g496bc5861c73 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 lockdep_register_key+0x253/0x3f0 kernel/locking/lockdep.c:1225 htab_map_alloc+0x9b/0xe60 kernel/bpf/hashtab.c:506 map_create+0x90c/0x1200 kernel/bpf/syscall.c:1333 __sys_bpf+0x6d1/0x810 kernel/bpf/syscall.c:5659 __do_sys_bpf kernel/bpf/syscall.c:5784 [inline] __se_sys_bpf kernel/bpf/syscall.c:5782 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5782 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4ea9a7dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4ea95ff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f4ea9babf80 RCX: 00007f4ea9a7dea9 RDX: 0000000000000048 RSI: 0000000020000000 RDI: 0000000000000000 RBP: 00007f4ea9aca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f4ea9babf80 R15: 00007ffe17a9e318 Allocated by task 6227: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x1db/0x360 mm/slub.c:3997 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] sctp_transport_new+0x7e/0x5d0 net/sctp/transport.c:97 sctp_assoc_add_peer+0x228/0x15c0 net/sctp/associola.c:616 sctp_process_param net/sctp/sm_make_chunk.c:2576 [inline] sctp_process_init+0xe40/0x2b20 net/sctp/sm_make_chunk.c:2396 sctp_cmd_process_init net/sctp/sm_sideeffect.c:706 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1389 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1198 [inline] sctp_do_sm+0x19aa/0x60c0 net/sctp/sm_sideeffect.c:1169 sctp_assoc_bh_rcv+0x3f1/0x640 net/sctp/associola.c:1051 sctp_backlog_rcv+0x177/0x3f0 net/sctp/input.c:331 sk_backlog_rcv include/net/sock.h:1106 [inline] __release_sock+0x243/0x350 net/core/sock.c:2983 release_sock+0x61/0x1f0 net/core/sock.c:3549 sctp_wait_for_connect+0x3ce/0x6e0 net/sctp/socket.c:9345 sctp_sendmsg_to_asoc+0x1404/0x1800 net/sctp/socket.c:1885 sctp_sendmsg+0x1bc3/0x3520 net/sctp/socket.c:2031 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2191 __do_sys_sendto net/socket.c:2203 [inline] __se_sys_sendto net/socket.c:2199 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2199 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 rcu_do_batch kernel/rcu/tree.c:2196 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2471 __do_softirq+0x2c6/0x980 kernel/softirq.c:554 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:2734 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2838 sctp_association_free+0x668/0x7b0 net/sctp/associola.c:379 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1330 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1198 [inline] sctp_do_sm+0x4393/0x60c0 net/sctp/sm_sideeffect.c:1169 sctp_primitive_ABORT+0x98/0xc0 net/sctp/primitive.c:104 sctp_close+0x2b7/0x920 net/sctp/socket.c:1526 inet_release+0x17d/0x200 net/ipv4/af_inet.c:437 __sock_release net/socket.c:659 [inline] sock_close+0xbc/0x240 net/socket.c:1421 __fput+0x429/0x8a0 fs/file_table.c:422 task_work_run+0x24f/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa1b/0x27e0 kernel/exit.c:878 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 get_signal+0x16a1/0x1740 kernel/signal.c:2911