================================================================== BUG: KASAN: slab-out-of-bounds in __swab64p include/uapi/linux/swab.h:192 [inline] BUG: KASAN: slab-out-of-bounds in __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:74 [inline] BUG: KASAN: slab-out-of-bounds in is_tx_ready include/net/tls.h:354 [inline] BUG: KASAN: slab-out-of-bounds in tls_write_space+0x29d/0x2d0 net/tls/tls_main.c:236 Read of size 8 at addr ffff8801c76940b0 by task syz-executor3/25220 CPU: 0 PID: 25220 Comm: syz-executor3 Not tainted 4.19.0-rc5-next-20180924+ #78 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d3/0x2c4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __swab64p include/uapi/linux/swab.h:192 [inline] __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:74 [inline] is_tx_ready include/net/tls.h:354 [inline] tls_write_space+0x29d/0x2d0 net/tls/tls_main.c:236 tcp_new_space net/ipv4/tcp_input.c:5154 [inline] tcp_check_space+0x253/0x910 net/ipv4/tcp_input.c:5165 tcp_data_snd_check net/ipv4/tcp_input.c:5175 [inline] tcp_rcv_established+0xa45/0x2120 net/ipv4/tcp_input.c:5656 tcp_v6_do_rcv+0x4b3/0x13c0 net/ipv6/tcp_ipv6.c:1326 tcp_v6_rcv+0x2f7a/0x38a0 net/ipv6/tcp_ipv6.c:1555 ip6_input_finish+0x3fc/0x1aa0 net/ipv6/ip6_input.c:384 NF_HOOK include/linux/netfilter.h:287 [inline] ip6_input+0xe4/0x600 net/ipv6/ip6_input.c:427 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x17a/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:287 [inline] ipv6_rcv+0x10e/0x640 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4894 __netif_receive_skb+0x27/0x1e0 net/core/dev.c:5004 process_backlog+0x217/0x760 net/core/dev.c:5808 napi_poll net/core/dev.c:6228 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6294 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x750 arch/x86/kernel/apic/apic.c:1056 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:804 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xaf/0xd0 kernel/locking/spinlock.c:184 Code: d0 36 72 89 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 28 48 83 3d b8 8c b0 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb ad e8 0c d5 3e f9 eb bb 0f 0b 0f 0b e8 7a 32 ff RSP: 0018:ffff8801808f7190 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 0000000000000282 RCX: 1ffff100391c0d61 RDX: 1ffffffff12e46da RSI: 0000000000000000 RDI: 0000000000000282 RBP: ffff8801808f71a0 R08: ffff8801c8e06b08 R09: 0000000000000006 R10: 0000000000000000 R11: ffff8801c8e06240 R12: ffff8801d94dc5f0 R13: ffff8801808f7288 R14: ffff8801d5b326f8 R15: ffff8801d94dc5f0 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] klist_next+0x1df/0x470 lib/klist.c:402 class_dev_iter_next+0x92/0xd0 drivers/base/class.c:304 class_find_device+0x145/0x210 drivers/base/class.c:408 tty_get_device drivers/tty/tty_io.c:2802 [inline] alloc_tty_struct+0x77b/0xaa0 drivers/tty/tty_io.c:2849 pty_common_install+0x274/0xbe0 drivers/tty/pty.c:398 pty_unix98_install+0x1f/0x30 drivers/tty/pty.c:730 tty_driver_install_tty drivers/tty/tty_io.c:1224 [inline] tty_init_dev+0xfd/0x460 drivers/tty/tty_io.c:1329 ptmx_open+0x12a/0x360 drivers/tty/pty.c:835 chrdev_open+0x25a/0x710 fs/char_dev.c:417 do_dentry_open+0x499/0x1250 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x12bc/0x5160 fs/namei.c:3534 do_filp_open+0x255/0x380 fs/namei.c:3564 do_sys_open+0x568/0x700 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1084 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457679 Code: 1d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6a1004ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f6a1004b6d4 RCX: 0000000000457679 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: ffffffffffffff9c RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d4558 R14: 00000000004c2d98 R15: 0000000000000001 Allocated by task 21346: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x730 mm/slab.c:3554 getname_flags+0xd0/0x590 fs/namei.c:140 user_path_at_empty+0x2d/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x129/0x210 fs/stat.c:185 vfs_lstat include/linux/fs.h:3154 [inline] __do_sys_newlstat+0x8f/0x110 fs/stat.c:352 __se_sys_newlstat fs/stat.c:346 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:346 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 21346: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3756 putname+0xf2/0x130 fs/namei.c:261 filename_lookup+0x39a/0x520 fs/namei.c:2357 user_path_at_empty+0x40/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x129/0x210 fs/stat.c:185 vfs_lstat include/linux/fs.h:3154 [inline] __do_sys_newlstat+0x8f/0x110 fs/stat.c:352 __se_sys_newlstat fs/stat.c:346 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:346 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801c76945c0 which belongs to the cache names_cache of size 4096 The buggy address is located 1296 bytes to the left of 4096-byte region [ffff8801c76945c0, ffff8801c76955c0) The buggy address belongs to the page: page:ffffea00071da500 count:1 mapcount:0 mapping:ffff8801da989e00 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea000632c308 ffffea0007532d88 ffff8801da989e00 raw: 0000000000000000 ffff8801c76945c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c7693f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c7694000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c7694080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c7694100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c7694180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================