================================================================== BUG: KASAN: slab-out-of-bounds in erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 Read of size 2 at addr ffff8801d015b08b by task syz-executor4/30967 CPU: 0 PID: 30967 Comm: syz-executor4 Not tainted 4.15.0-rc9+ #206 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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_load_n_noabort+0xf/0x20 mm/kasan/report.c:440 erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 __netdev_start_xmit include/linux/netdevice.h:4055 [inline] netdev_start_xmit include/linux/netdevice.h:4064 [inline] packet_direct_xmit+0x3ad/0x790 net/packet/af_packet.c:267 packet_snd net/packet/af_packet.c:2944 [inline] packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2969 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1721 SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452f19 RSP: 002b:00007f186b0b6c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452f19 RDX: 0000000000000000 RSI: 0000000020003fd9 RDI: 0000000000000013 RBP: 0000000000000367 R08: 0000000020008000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f4248 R13: 00000000ffffffff R14: 00007f186b0b76d4 R15: 0000000000000000 Allocated by task 29248: 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] kzalloc include/linux/slab.h:688 [inline] __crypto_alloc_tfm+0xd0/0x4e0 crypto/api.c:359 crypto_init_skcipher_ops_blkcipher crypto/skcipher.c:659 [inline] crypto_skcipher_init_tfm+0x4ee/0x840 crypto/skcipher.c:825 crypto_create_tfm+0xdf/0x2e0 crypto/api.c:462 crypto_alloc_tfm+0x10e/0x2f0 crypto/api.c:540 crypto_alloc_skcipher+0x2c/0x40 crypto/skcipher.c:927 skcipher_bind+0x6c/0xe0 crypto/algif_skcipher.c:324 alg_bind+0x1ab/0x440 crypto/af_alg.c:179 SYSC_bind+0x1c3/0x410 net/socket.c:1448 SyS_bind+0x24/0x30 net/socket.c:1434 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 29248: 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 kzfree+0x28/0x30 mm/slab_common.c:1482 crypto_destroy_tfm+0x140/0x2e0 crypto/api.c:581 crypto_free_tfm include/linux/crypto.h:641 [inline] crypto_free_blkcipher include/linux/crypto.h:1142 [inline] crypto_exit_skcipher_ops_blkcipher+0x34/0x40 crypto/skcipher.c:645 crypto_exit_ops crypto/api.c:315 [inline] crypto_destroy_tfm+0xb9/0x2e0 crypto/api.c:579 crypto_free_skcipher include/crypto/skcipher.h:212 [inline] skcipher_release+0x30/0x50 crypto/algif_skcipher.c:339 alg_do_release crypto/af_alg.c:119 [inline] alg_bind+0x27b/0x440 crypto/af_alg.c:200 SYSC_bind+0x1c3/0x410 net/socket.c:1448 SyS_bind+0x24/0x30 net/socket.c:1434 entry_SYSCALL_64_fastpath+0x29/0xa0 The buggy address belongs to the object at ffff8801d01585c0 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 2763 bytes to the right of 8192-byte region [ffff8801d01585c0, ffff8801d015a5c0) The buggy address belongs to the page: page:ffffea0007405600 count:1 mapcount:0 mapping:ffff8801d01585c0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801d01585c0 0000000000000000 0000000100000001 raw: ffffea0007052420 ffffea00071a5b20 ffff8801dac02080 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d015af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801d015b000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801d015b080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801d015b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801d015b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================