================================================================== 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 ffff8801cc5b2ff0 by task syz-executor0/11516 CPU: 1 PID: 11516 Comm: syz-executor0 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 do_tcp_setsockopt.isra.40+0x1371/0x2770 net/ipv4/tcp.c:3041 tcp_setsockopt+0xc1/0xe0 net/ipv4/tcp.c:3066 tls_setsockopt+0xaa/0x770 net/tls/tls_main.c:531 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3038 __sys_setsockopt+0x1ba/0x3c0 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457579 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:00007fd6a3866c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000457579 RDX: 0000000000000019 RSI: 0000000000000006 RDI: 0000000000000004 RBP: 000000000072bf00 R08: 0000000000000004 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 00007fd6a38676d4 R13: 00000000004c3e46 R14: 00000000004d6128 R15: 00000000ffffffff Allocated by task 7304: 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 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.39+0x41/0xe0 net/core/skbuff.c:137 __alloc_skb+0x150/0x770 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:997 [inline] alloc_uevent_skb+0x86/0x220 lib/kobject_uevent.c:288 uevent_net_broadcast_tagged lib/kobject_uevent.c:349 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0x101a/0x1370 lib/kobject_uevent.c:587 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:636 kobject_cleanup lib/kobject.c:649 [inline] kobject_release lib/kobject.c:691 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x398/0x4c0 lib/kobject.c:708 netdev_queue_update_kobjects+0x312/0x4f0 net/core/net-sysfs.c:1513 remove_queue_kobjects net/core/net-sysfs.c:1563 [inline] netdev_unregister_kobject+0x1ff/0x2e0 net/core/net-sysfs.c:1713 rollback_registered_many+0x8fa/0x1230 net/core/dev.c:7977 rollback_registered+0x1e9/0x420 net/core/dev.c:7995 unregister_netdevice_queue+0x321/0x5e0 net/core/dev.c:9039 unregister_netdevice include/linux/netdevice.h:2621 [inline] __tun_detach+0x11b8/0x15c0 drivers/net/tun.c:728 tun_detach drivers/net/tun.c:745 [inline] tun_chr_close+0xe3/0x180 drivers/net/tun.c:3421 __fput+0x3bc/0xa70 fs/file_table.c:279 ____fput+0x15/0x20 fs/file_table.c:312 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7304: 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] kfree+0xcf/0x230 mm/slab.c:3813 skb_free_head+0x99/0xc0 net/core/skbuff.c:550 skb_release_data+0x6a4/0x880 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0x1a9/0x560 net/core/skbuff.c:701 netlink_broadcast_filtered+0x6e6/0x1680 net/netlink/af_netlink.c:1512 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1534 uevent_net_broadcast_tagged lib/kobject_uevent.c:370 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0x1100/0x1370 lib/kobject_uevent.c:587 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:636 kobject_cleanup lib/kobject.c:649 [inline] kobject_release lib/kobject.c:691 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x398/0x4c0 lib/kobject.c:708 netdev_queue_update_kobjects+0x312/0x4f0 net/core/net-sysfs.c:1513 remove_queue_kobjects net/core/net-sysfs.c:1563 [inline] netdev_unregister_kobject+0x1ff/0x2e0 net/core/net-sysfs.c:1713 rollback_registered_many+0x8fa/0x1230 net/core/dev.c:7977 rollback_registered+0x1e9/0x420 net/core/dev.c:7995 unregister_netdevice_queue+0x321/0x5e0 net/core/dev.c:9039 unregister_netdevice include/linux/netdevice.h:2621 [inline] __tun_detach+0x11b8/0x15c0 drivers/net/tun.c:728 tun_detach drivers/net/tun.c:745 [inline] tun_chr_close+0xe3/0x180 drivers/net/tun.c:3421 __fput+0x3bc/0xa70 fs/file_table.c:279 ____fput+0x15/0x20 fs/file_table.c:312 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801cc5b2c80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 368 bytes to the right of 512-byte region [ffff8801cc5b2c80, ffff8801cc5b2e80) The buggy address belongs to the page: page:ffffea0007316c80 count:1 mapcount:0 mapping:ffff8801da800940 index:0xffff8801cc5b2500 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0007322d48 ffffea00074900c8 ffff8801da800940 raw: ffff8801cc5b2500 ffff8801cc5b2000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cc5b2e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cc5b2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801cc5b2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801cc5b3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cc5b3080: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 ==================================================================