BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x448/0x4b0 net/tipc/name_table.c:700 Read of size 4 at addr ffff88006d8499d0 by task syzkaller492056/2989 CPU: 2 PID: 2989 Comm: syzkaller492056 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+0x448/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_sendmsg+0x50/0x70 net/tipc/socket.c:1250 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:0x435019 RSP: 002b:00007fff5170dfd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000435019 RDX: 0000000000000000 RSI: 0000000020316000 RDI: 0000000000000004 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000401990 R14: 0000000000401a20 R15: 0000000000000000 Allocated by task 2989: 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 SYSC_bind+0x1b4/0x3f0 net/socket.c:1475 SyS_bind+0x24/0x30 net/socket.c:1461 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 2677: 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:3492 [inline] kfree+0xca/0x250 mm/slab.c:3807 selinux_cred_free+0x48/0x70 security/selinux/hooks.c:3798 security_cred_free+0x48/0x80 security/security.c:994 put_cred_rcu+0x106/0x400 kernel/cred.c:117 __rcu_reclaim kernel/rcu/rcu.h:172 [inline] rcu_do_batch kernel/rcu/tree.c:2676 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2897 [inline] rcu_process_callbacks+0xd74/0x17d0 kernel/rcu/tree.c:2914 __do_softirq+0x2d7/0xb85 kernel/softirq.c:284 The buggy address belongs to the object at ffff88006d8499c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff88006d8499c0, ffff88006d8499e0) The buggy address belongs to the page: page:ffffea0001b61240 count:1 mapcount:0 mapping:ffff88006d849000 index:0xffff88006d849fc1 flags: 0x500000000000100(slab) raw: 0500000000000100 ffff88006d849000 ffff88006d849fc1 000000010000003f raw: ffffea0001b61c60 ffff88006d800248 ffff88003e8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88006d849880: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc ffff88006d849900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88006d849980: 00 00 00 00 fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff88006d849a00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ffff88006d849a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================