syzkaller login: [ 12.664511][ T22] audit: type=1400 audit(1583708130.542:12): avc: denied { map } for pid=1857 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.0.108' (ECDSA) to the list of known hosts. [ 33.761167][ T22] audit: type=1400 audit(1583708151.642:13): avc: denied { map } for pid=1881 comm="syz-executor598" path="/root/syz-executor598241696" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 33.767530][ T1888] cgroup1: Unknown subsys name 'perf_event' [ 33.767890][ T1888] cgroup1: Unknown subsys name 'net_cls' [ 33.773215][ T1892] cgroup1: Unknown subsys name 'perf_event' [ 33.775197][ T1892] cgroup1: Unknown subsys name 'net_cls' [ 33.776048][ T1889] cgroup1: Unknown subsys name 'perf_event' [ 33.777690][ T1893] cgroup1: Unknown subsys name 'perf_event' [ 33.777966][ T1889] cgroup1: Unknown subsys name 'net_cls' [ 33.778920][ T1893] cgroup1: Unknown subsys name 'net_cls' [ 33.784276][ T1890] cgroup1: Unknown subsys name 'perf_event' [ 33.789136][ T1891] cgroup1: Unknown subsys name 'perf_event' [ 33.795161][ T1890] cgroup1: Unknown subsys name 'net_cls' executing program executing program executing program executing program executing program executing program [ 33.796275][ T22] audit: type=1400 audit(1583708151.672:14): avc: denied { associate } for pid=1888 comm="syz-executor598" name="syz5" scontext=unconfined_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem permissive=1 [ 33.825566][ T1891] cgroup1: Unknown subsys name 'net_cls' executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 34.995511][ T1968] ================================================================== [ 35.003649][ T1968] BUG: KASAN: use-after-free in free_netdev+0x186/0x300 [ 35.010561][ T1968] Read of size 8 at addr ffff8881cebba4f0 by task syz-executor598/1968 [ 35.018781][ T1968] [ 35.021094][ T1968] CPU: 0 PID: 1968 Comm: syz-executor598 Not tainted 5.4.24-syzkaller-00181-g3334f0da669e #0 [ 35.031220][ T1968] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.041263][ T1968] Call Trace: [ 35.044530][ T1968] dump_stack+0x1b0/0x228 [ 35.048844][ T1968] ? show_regs_print_info+0x18/0x18 [ 35.054020][ T1968] ? vprintk_func+0x105/0x110 [ 35.058684][ T1968] ? printk+0xc0/0x109 [ 35.062737][ T1968] print_address_description+0x96/0x5d0 [ 35.068270][ T1968] ? devkmsg_release+0x127/0x127 [ 35.073194][ T1968] ? call_rcu+0x10/0x10 [ 35.077337][ T1968] __kasan_report+0x14b/0x1c0 [ 35.082100][ T1968] ? free_netdev+0x186/0x300 [ 35.086701][ T1968] kasan_report+0x26/0x50 [ 35.091047][ T1968] __asan_report_load8_noabort+0x14/0x20 [ 35.096677][ T1968] free_netdev+0x186/0x300 [ 35.101080][ T1968] netdev_run_todo+0xbc4/0xe00 [ 35.106195][ T1968] ? netdev_refcnt_read+0x1c0/0x1c0 [ 35.111371][ T1968] ? mutex_trylock+0xb0/0xb0 [ 35.115954][ T1968] ? netlink_net_capable+0x124/0x160 [ 35.121218][ T1968] rtnetlink_rcv_msg+0x963/0xc20 [ 35.126135][ T1968] ? is_bpf_text_address+0x2c8/0x2e0 [ 35.131398][ T1968] ? __kernel_text_address+0x9a/0x110 [ 35.136881][ T1968] ? rtnetlink_bind+0x80/0x80 [ 35.141566][ T1968] ? arch_stack_walk+0x98/0xe0 [ 35.146328][ T1968] ? __rcu_read_lock+0x50/0x50 [ 35.151076][ T1968] ? avc_has_perm_noaudit+0x2fc/0x3f0 [ 35.158964][ T1968] ? rhashtable_jhash2+0x1f1/0x330 [ 35.164052][ T1968] ? jhash+0x750/0x750 [ 35.168096][ T1968] ? rht_key_hashfn+0x157/0x240 [ 35.172922][ T1968] ? deferred_put_nlk_sk+0x200/0x200 [ 35.178188][ T1968] ? __alloc_skb+0x109/0x540 [ 35.182761][ T1968] ? jhash+0x750/0x750 [ 35.186805][ T1968] ? netlink_hash+0xd0/0xd0 [ 35.191330][ T1968] ? avc_has_perm+0x15f/0x260 [ 35.195986][ T1968] ? __rcu_read_lock+0x50/0x50 [ 35.200739][ T1968] netlink_rcv_skb+0x1f0/0x460 [ 35.205483][ T1968] ? rtnetlink_bind+0x80/0x80 [ 35.210139][ T1968] ? netlink_ack+0xa80/0xa80 [ 35.214707][ T1968] ? netlink_autobind+0x1c0/0x1c0 [ 35.219706][ T1968] ? __rcu_read_lock+0x50/0x50 [ 35.224454][ T1968] ? selinux_vm_enough_memory+0x160/0x160 [ 35.230150][ T1968] rtnetlink_rcv+0x1c/0x20 [ 35.234742][ T1968] netlink_unicast+0x87c/0xa20 [ 35.239611][ T1968] ? netlink_detachskb+0x60/0x60 [ 35.244541][ T1968] ? security_netlink_send+0xab/0xc0 [ 35.249817][ T1968] netlink_sendmsg+0x9a7/0xd40 [ 35.254582][ T1968] ? netlink_getsockopt+0x900/0x900 [ 35.259765][ T1968] ? security_socket_sendmsg+0xad/0xc0 [ 35.265206][ T1968] ? netlink_getsockopt+0x900/0x900 [ 35.270378][ T1968] ____sys_sendmsg+0x56f/0x860 [ 35.275129][ T1968] ? __sys_sendmsg_sock+0x2a0/0x2a0 [ 35.280303][ T1968] ? __fdget+0x17c/0x200 [ 35.284531][ T1968] __sys_sendmsg+0x26a/0x350 [ 35.289097][ T1968] ? errseq_set+0x102/0x140 [ 35.293586][ T1968] ? ____sys_sendmsg+0x860/0x860 [ 35.298504][ T1968] ? __rcu_read_lock+0x50/0x50 [ 35.304031][ T1968] ? alloc_file_pseudo+0x282/0x310 [ 35.309155][ T1968] ? __kasan_check_write+0x14/0x20 [ 35.314257][ T1968] ? __kasan_check_write+0x14/0x20 [ 35.319360][ T1968] ? __fpregs_load_activate+0x2fc/0x3b0 [ 35.324883][ T1968] ? switch_fpu_return+0x10/0x10 [ 35.329804][ T1968] ? __kasan_check_read+0x11/0x20 [ 35.334806][ T1968] ? fput_many+0x47/0x1a0 [ 35.339117][ T1968] __x64_sys_sendmsg+0x7f/0x90 [ 35.343863][ T1968] do_syscall_64+0xc0/0x100 [ 35.348352][ T1968] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 35.354242][ T1968] RIP: 0033:0x447c09 [ 35.358119][ T1968] Code: e8 3c e6 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 ab 06 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 35.377702][ T1968] RSP: 002b:00007f6b873a9ce8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 35.386098][ T1968] RAX: ffffffffffffffda RBX: 00000000006ddc68 RCX: 0000000000447c09 [ 35.394047][ T1968] RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000005 [ 35.401996][ T1968] RBP: 00000000006ddc60 R08: 0000000000000000 R09: 0000000000000000 [ 35.409946][ T1968] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc6c [ 35.417901][ T1968] R13: 00007ffc595d639f R14: 00007f6b873aa9c0 R15: 0000000000000000 [ 35.425849][ T1968] [ 35.428165][ T1968] Allocated by task 1968: [ 35.432482][ T1968] __kasan_kmalloc+0x117/0x1b0 [ 35.437230][ T1968] kasan_kmalloc+0x9/0x10 [ 35.441536][ T1968] __kmalloc+0x102/0x310 [ 35.445764][ T1968] sk_prot_alloc+0x11c/0x2f0 [ 35.450334][ T1968] sk_alloc+0x35/0x300 [ 35.454474][ T1968] tun_chr_open+0x7b/0x4a0 [ 35.458875][ T1968] misc_open+0x3ea/0x440 [ 35.463101][ T1968] chrdev_open+0x60a/0x670 [ 35.468287][ T1968] do_dentry_open+0x8f7/0x1070 [ 35.473030][ T1968] vfs_open+0x73/0x80 [ 35.477099][ T1968] path_openat+0x1681/0x42d0 [ 35.481672][ T1968] do_filp_open+0x1f7/0x430 [ 35.486151][ T1968] do_sys_open+0x36f/0x7a0 [ 35.490545][ T1968] __x64_sys_openat+0xa2/0xb0 [ 35.495198][ T1968] do_syscall_64+0xc0/0x100 [ 35.499675][ T1968] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 35.505545][ T1968] [ 35.507859][ T1968] Freed by task 1967: [ 35.511827][ T1968] __kasan_slab_free+0x168/0x220 [ 35.516736][ T1968] kasan_slab_free+0xe/0x10 [ 35.521212][ T1968] kfree+0x170/0x6d0 [ 35.525082][ T1968] __sk_destruct+0x45f/0x4e0 [ 35.529643][ T1968] __sk_free+0x35d/0x430 [ 35.533857][ T1968] sk_free+0x45/0x50 [ 35.537734][ T1968] __tun_detach+0x15d0/0x1a40 [ 35.542393][ T1968] tun_chr_close+0xb8/0xd0 [ 35.546782][ T1968] __fput+0x295/0x710 [ 35.550740][ T1968] ____fput+0x15/0x20 [ 35.554879][ T1968] task_work_run+0x176/0x1a0 [ 35.559445][ T1968] prepare_exit_to_usermode+0x2d8/0x370 [ 35.566717][ T1968] syscall_return_slowpath+0x6f/0x500 [ 35.572071][ T1968] do_syscall_64+0xe8/0x100 [ 35.576561][ T1968] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 35.582423][ T1968] [ 35.584788][ T1968] The buggy address belongs to the object at ffff8881cebba000 [ 35.584788][ T1968] which belongs to the cache kmalloc-2k of size 2048 [ 35.598815][ T1968] The buggy address is located 1264 bytes inside of [ 35.598815][ T1968] 2048-byte region [ffff8881cebba000, ffff8881cebba800) [ 35.612232][ T1968] The buggy address belongs to the page: [ 35.617854][ T1968] page:ffffea00073aee00 refcount:1 mapcount:0 mapping:ffff8881da802800 index:0x0 compound_mapcount: 0 [ 35.628758][ T1968] flags: 0x8000000000010200(slab|head) [ 35.634202][ T1968] raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881da802800 [ 35.642763][ T1968] raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 [ 35.651316][ T1968] page dumped because: kasan: bad access detected [ 35.657723][ T1968] [ 35.660030][ T1968] Memory state around the buggy address: [ 35.665639][ T1968] ffff8881cebba380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.673709][ T1968] ffff8881cebba400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.681762][ T1968] >ffff8881cebba480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.690165][ T1968] ^ executing program [ 35.697862][ T1968] ffff8881cebba500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.706082][ T1968] ffff8881cebba580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.714138][ T1968] ================================================================== [ 35.722200][ T1968] Disabling lock debugging due to kernel taint executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program