[ OK ] Found device /dev/ttyS0. [ OK ] Started Getty on tty4. [ OK ] Started Serial Getty on ttyS0. [ OK ] Started OpenBSD Secure Shell server. [ OK ] Started getty on tty2-tty6 if dbus and logind are not available. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.89' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 46.079421][ T8392] ================================================================== [ 46.087619][ T8392] BUG: KASAN: use-after-free in cipso_v4_genopt+0x1078/0x1700 [ 46.095077][ T8392] Read of size 1 at addr ffff8881437d5710 by task syz-executor557/8392 [ 46.103296][ T8392] [ 46.105619][ T8392] CPU: 1 PID: 8392 Comm: syz-executor557 Not tainted 5.12.0-rc1-syzkaller #0 [ 46.114496][ T8392] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.124579][ T8392] Call Trace: [ 46.127847][ T8392] dump_stack+0x125/0x19e [ 46.132166][ T8392] print_address_description+0x5f/0x3a0 [ 46.137699][ T8392] kasan_report+0x15e/0x210 [ 46.142186][ T8392] ? cipso_v4_genopt+0x1078/0x1700 [ 46.147284][ T8392] cipso_v4_genopt+0x1078/0x1700 [ 46.152208][ T8392] ? cipso_v4_sock_setattr+0x62/0x460 [ 46.157564][ T8392] ? cipso_v4_sock_setattr+0x62/0x460 [ 46.162918][ T8392] cipso_v4_sock_setattr+0x7c/0x460 [ 46.168108][ T8392] netlbl_sock_setattr+0x28e/0x2f0 [ 46.173224][ T8392] smack_socket_post_create+0x13b/0x280 [ 46.178753][ T8392] security_socket_post_create+0x6f/0xd0 [ 46.184387][ T8392] __sock_create+0x62f/0x8c0 [ 46.188963][ T8392] __sys_socket+0xde/0x2d0 [ 46.193369][ T8392] __x64_sys_socket+0x76/0x80 [ 46.198043][ T8392] do_syscall_64+0x2d/0x70 [ 46.202474][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 46.208367][ T8392] RIP: 0033:0x440999 [ 46.212244][ T8392] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 46.231830][ T8392] RSP: 002b:00007ffcfe002d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000029 [ 46.240227][ T8392] RAX: ffffffffffffffda RBX: 000000000000b3fc RCX: 0000000000440999 [ 46.248190][ T8392] RDX: 0000000000000002 RSI: 0000000000000003 RDI: 0000040000000002 [ 46.256166][ T8392] RBP: 0000000000000000 R08: 00007ffcfe002ee8 R09: 00007ffcfe002ee8 [ 46.264125][ T8392] R10: 0000000000000012 R11: 0000000000000246 R12: 00007ffcfe002d5c [ 46.272096][ T8392] R13: 431bde82d7b634db R14: 00000000004ae018 R15: 00000000004004a0 [ 46.280062][ T8392] [ 46.282369][ T8392] Allocated by task 1: [ 46.286412][ T8392] ____kasan_kmalloc+0xc2/0xf0 [ 46.291186][ T8392] kmem_cache_alloc_trace+0x21b/0x340 [ 46.296541][ T8392] smk_cipso_doi+0x1af/0x4e0 [ 46.301122][ T8392] init_smk_fs+0xe2/0x24e [ 46.305462][ T8392] do_one_initcall+0x12b/0x310 [ 46.310205][ T8392] do_initcall_level+0x14a/0x1f5 [ 46.315135][ T8392] do_initcalls+0x4b/0x8c [ 46.319451][ T8392] kernel_init_freeable+0x2e3/0x406 [ 46.324630][ T8392] kernel_init+0xd/0x290 [ 46.328866][ T8392] ret_from_fork+0x1f/0x30 [ 46.333263][ T8392] [ 46.335569][ T8392] Freed by task 0: [ 46.339265][ T8392] kasan_set_track+0x3d/0x70 [ 46.343835][ T8392] kasan_set_free_info+0x1f/0x40 [ 46.348764][ T8392] ____kasan_slab_free+0x100/0x140 [ 46.353854][ T8392] slab_free_freelist_hook+0x13a/0x200 [ 46.359293][ T8392] kfree+0xcf/0x2b0 [ 46.363080][ T8392] rcu_core+0x7a0/0x1220 [ 46.367299][ T8392] __do_softirq+0x318/0x714 [ 46.371784][ T8392] [ 46.374086][ T8392] Last potentially related work creation: [ 46.379779][ T8392] kasan_save_stack+0x27/0x50 [ 46.384453][ T8392] kasan_record_aux_stack+0xee/0x120 [ 46.389723][ T8392] call_rcu+0x12f/0x8a0 [ 46.393863][ T8392] cipso_v4_doi_remove+0x2e2/0x310 [ 46.398952][ T8392] netlbl_cipsov4_remove+0x219/0x390 [ 46.404215][ T8392] genl_rcv_msg+0xe4e/0x1280 [ 46.408958][ T8392] netlink_rcv_skb+0x190/0x3a0 [ 46.413699][ T8392] genl_rcv+0x24/0x40 [ 46.417657][ T8392] netlink_unicast+0x786/0x940 [ 46.422401][ T8392] netlink_sendmsg+0x9ae/0xd50 [ 46.427146][ T8392] ____sys_sendmsg+0x519/0x800 [ 46.431888][ T8392] __sys_sendmsg+0x2bf/0x370 [ 46.436454][ T8392] do_syscall_64+0x2d/0x70 [ 46.440847][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 46.446718][ T8392] [ 46.449023][ T8392] The buggy address belongs to the object at ffff8881437d5700 [ 46.449023][ T8392] which belongs to the cache kmalloc-64 of size 64 [ 46.462878][ T8392] The buggy address is located 16 bytes inside of [ 46.462878][ T8392] 64-byte region [ffff8881437d5700, ffff8881437d5740) [ 46.475959][ T8392] The buggy address belongs to the page: [ 46.481582][ T8392] page:000000003e519aab refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8881437d5b00 pfn:0x1437d5 [ 46.493142][ T8392] flags: 0x57ff00000000200(slab) [ 46.498069][ T8392] raw: 057ff00000000200 ffffea000511ff88 ffffea00051d0a48 ffff888010841640 [ 46.506638][ T8392] raw: ffff8881437d5b00 0000000000200019 00000001ffffffff 0000000000000000 [ 46.515197][ T8392] page dumped because: kasan: bad access detected [ 46.521642][ T8392] [ 46.523947][ T8392] Memory state around the buggy address: [ 46.529605][ T8392] ffff8881437d5600: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 46.537658][ T8392] ffff8881437d5680: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 46.545698][ T8392] >ffff8881437d5700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 46.553735][ T8392] ^ [ 46.558318][ T8392] ffff8881437d5780: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc [ 46.566357][ T8392] ffff8881437d5800: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc [ 46.574393][ T8392] ================================================================== [ 46.583299][ T8392] Disabling lock debugging due to kernel taint [ 46.589467][ T8392] Kernel panic - not syncing: panic_on_warn set ... [ 46.596045][ T8392] CPU: 1 PID: 8392 Comm: syz-executor557 Tainted: G B 5.12.0-rc1-syzkaller #0 [ 46.606192][ T8392] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.616239][ T8392] Call Trace: [ 46.619501][ T8392] dump_stack+0x125/0x19e [ 46.623814][ T8392] panic+0x291/0x800 [ 46.627729][ T8392] ? trace_hardirqs_on+0x30/0x80 [ 46.632651][ T8392] ? trace_hardirqs_on+0x30/0x80 [ 46.637565][ T8392] ? _raw_spin_unlock_irqrestore+0x33/0x50 [ 46.643350][ T8392] kasan_report+0x203/0x210 [ 46.647842][ T8392] ? cipso_v4_genopt+0x1078/0x1700 [ 46.652931][ T8392] cipso_v4_genopt+0x1078/0x1700 [ 46.657850][ T8392] ? cipso_v4_sock_setattr+0x62/0x460 [ 46.663204][ T8392] ? cipso_v4_sock_setattr+0x62/0x460 [ 46.668552][ T8392] cipso_v4_sock_setattr+0x7c/0x460 [ 46.673726][ T8392] netlbl_sock_setattr+0x28e/0x2f0 [ 46.678813][ T8392] smack_socket_post_create+0x13b/0x280 [ 46.684349][ T8392] security_socket_post_create+0x6f/0xd0 [ 46.689976][ T8392] __sock_create+0x62f/0x8c0 [ 46.694545][ T8392] __sys_socket+0xde/0x2d0 [ 46.698939][ T8392] __x64_sys_socket+0x76/0x80 [ 46.703595][ T8392] do_syscall_64+0x2d/0x70 [ 46.707986][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 46.713856][ T8392] RIP: 0033:0x440999 [ 46.717724][ T8392] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 46.737308][ T8392] RSP: 002b:00007ffcfe002d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000029 [ 46.745731][ T8392] RAX: ffffffffffffffda RBX: 000000000000b3fc RCX: 0000000000440999 [ 46.753680][ T8392] RDX: 0000000000000002 RSI: 0000000000000003 RDI: 0000040000000002 [ 46.761630][ T8392] RBP: 0000000000000000 R08: 00007ffcfe002ee8 R09: 00007ffcfe002ee8 [ 46.769578][ T8392] R10: 0000000000000012 R11: 0000000000000246 R12: 00007ffcfe002d5c [ 46.777573][ T8392] R13: 431bde82d7b634db R14: 00000000004ae018 R15: 00000000004004a0 [ 46.786284][ T8392] Kernel Offset: disabled [ 46.790637][ T8392] Rebooting in 86400 seconds..