================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:618 Read of size 2 at addr ffff8801c9eb4624 by task kworker/1:1/23 CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted 4.15.0-rc5+ #173 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 3508: 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+0x105/0x1440 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+0x23/0x9a Freed by task 3493: 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 skb_free_head+0x74/0xb0 net/core/skbuff.c:550 skb_release_data+0x58c/0x790 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb+0x15/0x20 net/core/skbuff.c:641 sk_wmem_free_skb include/net/sock.h:1416 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1673 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3113 [inline] tcp_ack+0x1b8f/0x5010 net/ipv4/tcp_input.c:3596 tcp_rcv_established+0x10bb/0x1be0 net/ipv4/tcp_input.c:5376 tcp_v4_do_rcv+0x2ab/0x7d0 net/ipv4/tcp_ipv4.c:1468 sk_backlog_rcv include/net/sock.h:907 [inline] __release_sock+0x124/0x360 net/core/sock.c:2274 release_sock+0xa4/0x2a0 net/core/sock.c:2789 tcp_sendmsg+0x3a/0x50 net/ipv4/tcp.c:1466 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 sock_write_iter+0x31a/0x5d0 net/socket.c:907 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x23/0x9a The buggy address belongs to the object at ffff8801c9eb4100 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1316 bytes inside of 2048-byte region [ffff8801c9eb4100, ffff8801c9eb4900) The buggy address belongs to the page: page:00000000b5666cba count:1 mapcount:0 mapping:0000000001f39d9e index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801c9eb4100 0000000000000000 0000000100000003 raw: ffffea00073005a0 ffffea00070bd020 ffff8801dac00c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c9eb4500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c9eb4580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801c9eb4600: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c9eb4680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c9eb4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================