SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 ================================================================== entry_SYSCALL_64_after_hwframe+0x5e/0xd3 BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 RIP: 0033:0x7fd7bd0b90f9 Read of size 4 at addr ffff8880b32757d0 by task syz-executor.4/18352 RSP: 002b:00007fd7bb62b168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fd7bd1d8f80 RCX: 00007fd7bd0b90f9 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000004 RBP: 00007fd7bb62b1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffcf3cc38ef R14: 00007fd7bb62b300 R15: 0000000000022000 CPU: 0 PID: 18352 Comm: syz-executor.4 Not tainted 4.14.307-syzkaller #0 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:428 tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 tipc_sendmcast+0x51a/0xac0 net/tipc/socket.c:768 __tipc_sendmsg+0xbab/0xf90 net/tipc/socket.c:975 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:923 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f3178cb00f9 RSP: 002b:00007f3177222168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3178dcff80 RCX: 00007f3178cb00f9 RDX: 0000000000004040 RSI: 0000000020000300 RDI: 0000000000000005 RBP: 00007f3178d0bae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff2f3fc49f R14: 00007f3177222300 R15: 0000000000022000 CPU: 1 PID: 18351 Comm: syz-executor.1 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Allocated by task 8010: Call Trace: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x149 lib/fault-inject.c:149 tipc_nameseq_create+0x53/0x290 net/tipc/name_table.c:152 should_failslab+0xd6/0x130 mm/failslab.c:32 tipc_nametbl_insert_publ+0xb37/0x14e0 net/tipc/name_table.c:476 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc_node mm/slab.c:3297 [inline] kmem_cache_alloc_node_trace+0x25a/0x400 mm/slab.c:3659 tipc_nametbl_publish+0x211/0x3f0 net/tipc/name_table.c:701 __do_kmalloc_node mm/slab.c:3681 [inline] __kmalloc_node_track_caller+0x38/0x70 mm/slab.c:3696 tipc_sk_publish net/tipc/socket.c:2206 [inline] tipc_bind+0x2c4/0x600 net/tipc/socket.c:630 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 tipc_create_listen_sock net/tipc/server.c:338 [inline] tipc_open_listening_sock net/tipc/server.c:396 [inline] tipc_server_start+0x31f/0x880 net/tipc/server.c:611 tipc_topsrv_start net/tipc/subscr.c:382 [inline] tipc_topsrv_init_net+0x53b/0x730 net/tipc/subscr.c:397 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] tipc_buf_acquire+0x28/0xf0 net/tipc/msg.c:66 ops_init+0xaa/0x3e0 net/core/net_namespace.c:118 tipc_msg_build+0xcf/0xec0 net/tipc/msg.c:260 setup_net+0x22f/0x530 net/core/net_namespace.c:298 copy_net_ns+0x19b/0x440 net/core/net_namespace.c:422 create_new_namespaces+0x375/0x720 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa1/0x1d0 kernel/nsproxy.c:206 __tipc_sendmsg+0x503/0xf90 net/tipc/socket.c:1009 SYSC_unshare kernel/fork.c:2413 [inline] SyS_unshare+0x308/0x7f0 kernel/fork.c:2363 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:923 Freed by task 6228: sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __put_cred+0x1a1/0x210 kernel/cred.c:151 put_cred include/linux/cred.h:274 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x52a/0x680 fs/open.c:353 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880b32757c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8880b32757c0, ffff8880b32757e0) __sys_sendmsg+0xa3/0x120 net/socket.c:2096 The buggy address belongs to the page: page:ffffea0002cc9d40 count:1 mapcount:0 mapping:ffff8880b3275000 index:0xffff8880b3275fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b3275000 ffff8880b3275fc1 000000010000003c raw: ffffea00026b5f20 ffffea00028c1460 ffff88813fe741c0 0000000000000000 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 page dumped because: kasan: bad access detected do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 Memory state around the buggy address: entry_SYSCALL_64_after_hwframe+0x5e/0xd3 ffff8880b3275680: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc RIP: 0033:0x7fe1b5b120f9 ffff8880b3275700: fb fb fb fb fc fc fc fc 00 01 fc fc fc fc fc fc RSP: 002b:00007fe1b4084168 EFLAGS: 00000246 >ffff8880b3275780: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc ORIG_RAX: 000000000000002e ^ RAX: ffffffffffffffda RBX: 00007fe1b5c31f80 RCX: 00007fe1b5b120f9 ffff8880b3275800: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000004 ffff8880b3275880: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc RBP: 00007fe1b40841d0 R08: 0000000000000000 R09: 0000000000000000 ================================================================== R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc0e31d6df R14: 00007fe1b4084300 R15: 0000000000022000