================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:619 Read of size 2 at addr ffff8801ce2ad634 by task kworker/0:2/1345 CPU: 0 PID: 1345 Comm: kworker/0:2 Not tainted 4.14.0-rc5-mm1+ #20 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: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_load2_noabort+0x14/0x20 mm/kasan/report.c:428 xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:619 process_one_work+0xbf0/0x1bc0 kernel/workqueue.c:2112 worker_thread+0x223/0x1990 kernel/workqueue.c:2246 kthread+0x38b/0x470 kernel/kthread.c:242 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Allocated by task 13661: 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:3712 [inline] __kmalloc+0x162/0x760 mm/slab.c:3721 kmalloc include/linux/slab.h:504 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1469 sk_alloc+0x89/0x700 net/core/sock.c:1523 pfkey_create+0x2b2/0xae0 net/key/af_key.c:158 __sock_create+0x4d4/0x850 net/socket.c:1261 sock_create net/socket.c:1301 [inline] SYSC_socket net/socket.c:1331 [inline] SyS_socket+0xeb/0x200 net/socket.c:1311 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3233: 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 free_event_rcu+0x5c/0x70 kernel/events/core.c:3968 __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 ffff8801ce2ad100 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1332 bytes inside of 2048-byte region [ffff8801ce2ad100, ffff8801ce2ad900) The buggy address belongs to the page: page:ffffea000738ab00 count:1 mapcount:0 mapping:ffff8801ce2ac000 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801ce2ac000 0000000000000000 0000000100000003 raw: ffffea000721c3a0 ffffea00066028a0 ffff8801dac00c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ce2ad500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801ce2ad580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801ce2ad600: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801ce2ad680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801ce2ad700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================