BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x4a3/0x4b0 net/tipc/name_table.c:700 Read of size 4 at addr ffff88003be13450 by task syzkaller414110/2981 CPU: 3 PID: 2981 Comm: syzkaller414110 Not tainted 4.14.0-rc5-next-20171018+ #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 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+0x4a3/0x4b0 net/tipc/name_table.c:700 tipc_sendmcast+0x794/0xe70 net/tipc/socket.c:791 __tipc_sendmsg+0xebf/0x1b20 net/tipc/socket.c:1316 __tipc_sendstream+0x8eb/0xc00 net/tipc/socket.c:1410 tipc_sendstream+0x50/0x70 net/tipc/socket.c:1384 tipc_send_packet+0x33/0x50 net/tipc/socket.c:1458 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 ___sys_sendmsg+0x755/0x890 net/socket.c:2048 __sys_sendmsg+0xe5/0x210 net/socket.c:2082 SYSC_sendmsg net/socket.c:2093 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2089 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x434f39 RSP: 002b:00007ffca55641f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000434f39 RDX: 0000000000000004 RSI: 00000000203bbfc8 RDI: 0000000000000003 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004018b0 R14: 0000000000401940 R15: 0000000000000000 Allocated by task 1: 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 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3614 kmalloc include/linux/slab.h:502 [inline] kmalloc_array include/linux/slab.h:620 [inline] kcalloc include/linux/slab.h:632 [inline] tipc_subseq_alloc net/tipc/name_table.c:142 [inline] tipc_nameseq_create+0xe8/0x540 net/tipc/name_table.c:153 tipc_nametbl_insert_publ+0xf77/0x17c0 net/tipc/name_table.c:477 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:762 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2591 tipc_bind+0x1a9/0x2d0 net/tipc/socket.c:646 kernel_bind+0x62/0x80 net/socket.c:3284 tipc_create_listen_sock net/tipc/server.c:338 [inline] tipc_open_listening_sock net/tipc/server.c:396 [inline] tipc_server_start+0x39b/0xb60 net/tipc/server.c:677 tipc_topsrv_start+0x649/0x880 net/tipc/subscr.c:382 tipc_init_net+0x3cc/0x570 net/tipc/core.c:74 ops_init+0x10a/0x570 net/core/net_namespace.c:118 __register_pernet_operations net/core/net_namespace.c:879 [inline] register_pernet_operations+0x45e/0x980 net/core/net_namespace.c:953 register_pernet_subsys+0x2a/0x40 net/core/net_namespace.c:995 tipc_init+0x83/0x104 net/tipc/core.c:136 do_one_initcall+0x9e/0x330 init/main.c:824 do_initcall_level init/main.c:890 [inline] do_initcalls init/main.c:898 [inline] do_basic_setup init/main.c:916 [inline] kernel_init_freeable+0x469/0x521 init/main.c:1064 kernel_init+0x13/0x172 init/main.c:991 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88003be13440 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff88003be13440, ffff88003be13460) The buggy address belongs to the page: page:ffffea0000ef84c0 count:1 mapcount:0 mapping:ffff88003be13000 index:0xffff88003be13fc1 flags: 0x100000000000100(slab) raw: 0100000000000100 ffff88003be13000 ffff88003be13fc1 0000000100000021 raw: ffffea0000f278e0 ffffea0000f472e0 ffff88003e8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88003be13300: 00 06 fc fc fc fc fc fc 00 06 fc fc fc fc fc fc ffff88003be13380: 00 06 fc fc fc fc fc fc 00 06 fc fc fc fc fc fc >ffff88003be13400: 00 00 00 fc fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff88003be13480: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc ffff88003be13500: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc ==================================================================