================================================================== BUG: KASAN: slab-out-of-bounds in _decode_session6+0xe6c/0x12f0 net/ipv6/xfrm6_policy.c:136 Read of size 1 at addr ffff88809f144a90 by task syz-executor.4/11021 CPU: 1 PID: 11021 Comm: syz-executor.4 Not tainted 4.14.275-syzkaller #0 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+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 _decode_session6+0xe6c/0x12f0 net/ipv6/xfrm6_policy.c:136 __xfrm_decode_session+0x5a/0x110 net/xfrm/xfrm_policy.c:2242 xfrm_decode_session include/net/xfrm.h:1174 [inline] vti6_tnl_xmit+0x2f3/0x17d0 net/ipv6/ip6_vti.c:577 __netdev_start_xmit include/linux/netdevice.h:4052 [inline] netdev_start_xmit include/linux/netdevice.h:4061 [inline] xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021 sch_direct_xmit+0x251/0x500 net/sched/sch_generic.c:186 qdisc_restart net/sched/sch_generic.c:249 [inline] __qdisc_run+0x25d/0xe00 net/sched/sch_generic.c:257 __dev_xmit_skb net/core/dev.c:3231 [inline] __dev_queue_xmit+0x13ac/0x2480 net/core/dev.c:3489 neigh_output include/net/neighbour.h:500 [inline] ip6_finish_output2+0xf48/0x1f10 net/ipv6/ip6_output.c:120 ip6_finish_output+0x5c6/0xd50 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1c5/0x660 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:470 [inline] NF_HOOK include/linux/netfilter.h:250 [inline] ndisc_send_skb+0x82a/0x1390 net/ipv6/ndisc.c:483 ndisc_send_rs+0x125/0x630 net/ipv6/ndisc.c:677 addrconf_rs_timer+0x2bb/0x5a0 net/ipv6/addrconf.c:3769 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:seqcount_lockdep_reader_access include/linux/seqlock.h:83 [inline] RIP: 0010:read_seqcount_begin include/linux/seqlock.h:164 [inline] RIP: 0010:read_seqbegin include/linux/seqlock.h:441 [inline] RIP: 0010:zone_span_seqbegin include/linux/memory_hotplug.h:80 [inline] RIP: 0010:page_outside_zone_boundaries+0x1ff/0x310 mm/page_alloc.c:496 RSP: 0018:ffff8880a040f200 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff11e1309 RBX: ffff88813fffb6c0 RCX: 1ffff110142d25e5 RDX: 0000000000000000 RSI: ffff8880a1692f08 RDI: 0000000000000286 RBP: dffffc0000000000 R08: ffffffff8b9c6138 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: fffffbfff11e1308 R14: 1ffffffff11e130a R15: 0000000000000286 bad_range mm/page_alloc.c:525 [inline] rmqueue mm/page_alloc.c:2857 [inline] get_page_from_freelist+0xaf6/0x2560 mm/page_alloc.c:3173 __alloc_pages_nodemask+0x365/0x2720 mm/page_alloc.c:4185 alloc_pages_current+0x155/0x260 mm/mempolicy.c:2113 alloc_pages include/linux/gfp.h:520 [inline] __page_cache_alloc mm/filemap.c:871 [inline] pagecache_get_page+0x3f5/0xab0 mm/filemap.c:1501 find_or_create_page include/linux/pagemap.h:326 [inline] grow_dev_page fs/buffer.c:1004 [inline] grow_buffers fs/buffer.c:1077 [inline] __getblk_slow+0x1dd/0x7a0 fs/buffer.c:1104 __getblk_gfp+0x6b/0x70 fs/buffer.c:1383 __getblk include/linux/buffer_head.h:388 [inline] reiserfs_breada+0x120/0x330 fs/reiserfs/journal.c:2345 journal_read fs/reiserfs/journal.c:2455 [inline] journal_init+0x2166/0x5d80 fs/reiserfs/journal.c:2904 reiserfs_fill_super+0xa08/0x2980 fs/reiserfs/super.c:2035 mount_bdev+0x2b3/0x360 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2572 [inline] do_mount+0xe65/0x2a10 fs/namespace.c:2902 SYSC_mount fs/namespace.c:3118 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3095 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f2b01d1461a RSP: 002b:00007f2b00687f88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f2b01d1461a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f2b00687fe0 RBP: 00007f2b00688020 R08: 00007f2b00688020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f2b00687fe0 R15: 0000000020011500 Allocated by task 10563: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552 mempool_alloc+0x10e/0x2d0 mm/mempool.c:330 bvec_alloc+0xcc/0x2d0 block/bio.c:216 bio_alloc_bioset+0x585/0x830 block/bio.c:506 bio_alloc include/linux/bio.h:422 [inline] dio_bio_alloc fs/direct-io.c:439 [inline] dio_new_bio fs/direct-io.c:745 [inline] dio_send_cur_page fs/direct-io.c:827 [inline] submit_page_section fs/direct-io.c:884 [inline] do_direct_IO fs/direct-io.c:1098 [inline] do_blockdev_direct_IO fs/direct-io.c:1337 [inline] __blockdev_direct_IO+0x10a1/0xdcb0 fs/direct-io.c:1423 ext4_direct_IO_write fs/ext4/inode.c:3724 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3865 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 10563: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 mempool_free+0xcf/0x1d0 mm/mempool.c:439 bvec_free+0x7d/0xa0 block/bio.c:171 bio_free+0xd1/0x1a0 block/bio.c:257 bio_put+0x59/0x70 block/bio.c:558 dio_bio_complete+0x32e/0x5d0 fs/direct-io.c:563 dio_await_completion fs/direct-io.c:581 [inline] do_blockdev_direct_IO fs/direct-io.c:1394 [inline] __blockdev_direct_IO+0x7a20/0xdcb0 fs/direct-io.c:1423 ext4_direct_IO_write fs/ext4/inode.c:3724 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3865 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88809f145a40 which belongs to the cache biovec-max of size 8192 The buggy address is located 4016 bytes to the left of 8192-byte region [ffff88809f145a40, ffff88809f147a40) The buggy address belongs to the page: page:ffffea00027c5100 count:1 mapcount:0 mapping:ffff88809f145a40 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff88809f145a40 0000000000000000 0000000100000001 raw: ffffea0002a22620 ffffea00027c0820 ffff88823b3f7000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f144980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809f144a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809f144a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809f144b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809f144b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================