================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:618 Read of size 2 at addr ffff8801d51419a4 by task kworker/0:3/3469 CPU: 0 PID: 3469 Comm: kworker/0:3 Not tainted 4.15.0-rc4+ #164 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events xfrm_hash_rebuild 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_load2_noabort+0x14/0x20 mm/kasan/report.c:428 xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:618 process_one_work+0xbbf/0x1b10 kernel/workqueue.c:2112 worker_thread+0x223/0x1990 kernel/workqueue.c:2246 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:515 Allocated by task 18039: 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:3708 [inline] __kmalloc+0x162/0x760 mm/slab.c:3717 kmalloc include/linux/slab.h:504 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1471 sk_alloc+0x8c/0x730 net/core/sock.c:1525 pfkey_create+0x2b2/0xae0 net/key/af_key.c:158 __sock_create+0x4d4/0x850 net/socket.c:1257 sock_create net/socket.c:1297 [inline] SYSC_socket net/socket.c:1327 [inline] SyS_socket+0xeb/0x1d0 net/socket.c:1307 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 13641: 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:3488 [inline] kfree+0xd6/0x260 mm/slab.c:3803 sk_prot_free net/core/sock.c:1508 [inline] __sk_destruct+0x74a/0x910 net/core/sock.c:1590 sk_destruct+0x47/0x80 net/core/sock.c:1598 __sk_free+0xf1/0x2b0 net/core/sock.c:1609 sk_free+0x2a/0x40 net/core/sock.c:1620 deferred_put_nlk_sk+0x13d/0x310 net/netlink/af_netlink.c:741 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2758 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:3012 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2979 [inline] rcu_process_callbacks+0xd6c/0x17f0 kernel/rcu/tree.c:2996 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 The buggy address belongs to the object at ffff8801d5141480 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1316 bytes inside of 2048-byte region [ffff8801d5141480, ffff8801d5141c80) The buggy address belongs to the page: page:00000000a8604b6c count:1 mapcount:0 mapping:00000000dcaea5ba index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801d5140380 0000000000000000 0000000100000003 raw: ffffea000754dfa0 ffffea000752f120 ffff8801db000c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d5141880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801d5141900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801d5141980: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801d5141a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801d5141a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================