================================================================== BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x448/0x4b0 net/tipc/name_table.c:670 Read of size 4 at addr ffff8801d81a9360 by task syz-executor7/14910 CPU: 0 PID: 14910 Comm: syz-executor7 Not tainted 4.14.0-rc8+ #172 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 tipc_nametbl_lookup_dst_nodes+0x448/0x4b0 net/tipc/name_table.c:670 tipc_sendmcast+0x70b/0xe20 net/tipc/socket.c:767 __tipc_sendmsg+0xf49/0x1590 net/tipc/socket.c:971 tipc_sendmsg+0x50/0x70 net/tipc/socket.c:919 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x755/0x890 net/socket.c:2049 __sys_sendmsg+0xe5/0x210 net/socket.c:2083 SYSC_sendmsg net/socket.c:2094 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2090 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x452879 RSP: 002b:00007fe7a0925be8 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000000000000 RSI: 0000000020619000 RDI: 0000000000000016 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3d70 R13: 00000000ffffffff R14: 00007fe7a09266d4 R15: 0000000000000000 Allocated by task 14910: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3726 [inline] __kmalloc+0x162/0x760 mm/slab.c:3735 kmalloc_array include/linux/slab.h:613 [inline] kcalloc include/linux/slab.h:624 [inline] tipc_subseq_alloc net/tipc/name_table.c:141 [inline] tipc_nameseq_insert_publ net/tipc/name_table.c:271 [inline] tipc_nametbl_insert_publ+0x12bf/0x17c0 net/tipc/name_table.c:481 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:701 tipc_sk_publish net/tipc/socket.c:2201 [inline] tipc_bind+0x33a/0x700 net/tipc/socket.c:629 SYSC_bind+0x1b4/0x3f0 net/socket.c:1476 SyS_bind+0x24/0x30 net/socket.c:1462 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 13550: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3504 [inline] kfree+0xca/0x250 mm/slab.c:3821 selinux_sk_free_security+0x4f/0x60 security/selinux/hooks.c:4900 security_sk_free+0x48/0x80 security/security.c:1430 sk_prot_free net/core/sock.c:1504 [inline] __sk_destruct+0x609/0x910 net/core/sock.c:1587 sk_destruct+0x47/0x80 net/core/sock.c:1595 __sk_free+0x57/0x230 net/core/sock.c:1603 sk_free+0x2a/0x40 net/core/sock.c:1614 sock_put include/net/sock.h:1649 [inline] sk_common_release+0x1f0/0x2f0 net/core/sock.c:3018 inet6_create+0xdb0/0x1170 net/ipv6/af_inet6.c:266 __sock_create+0x4d4/0x850 net/socket.c:1262 sock_create net/socket.c:1302 [inline] SYSC_socket net/socket.c:1332 [inline] SyS_socket+0xeb/0x200 net/socket.c:1312 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff8801d81a9340 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes to the right of 32-byte region [ffff8801d81a9340, ffff8801d81a9360) The buggy address belongs to the page: page:ffffea0007606a40 count:1 mapcount:0 mapping:ffff8801d81a9000 index:0xffff8801d81a9fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d81a9000 ffff8801d81a9fc1 000000010000003f raw: ffffea00071d31e0 ffffea000720fa60 ffff8801dac001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d81a9200: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801d81a9280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8801d81a9300: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff8801d81a9380: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801d81a9400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================