Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.10.15' (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 executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 33.017846] ================================================================== [ 33.025290] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 33.032197] Read of size 4 at addr ffff88809b1238d8 by task syz-executor332/8195 [ 33.039702] [ 33.041314] CPU: 0 PID: 8195 Comm: syz-executor332 Not tainted 4.19.211-syzkaller #0 [ 33.049167] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.058510] Call Trace: [ 33.061080] dump_stack+0x1fc/0x2ef [ 33.064692] print_address_description.cold+0x54/0x219 [ 33.069950] kasan_report_error.cold+0x8a/0x1b9 [ 33.074604] ? refcount_dec_not_one+0x71/0x1d0 [ 33.079179] kasan_report+0x8f/0xa0 [ 33.082787] ? refcount_dec_not_one+0x71/0x1d0 [ 33.087351] refcount_dec_not_one+0x71/0x1d0 [ 33.091754] ? refcount_dec_and_test_checked+0x20/0x20 [ 33.097023] ? nbd_config_put+0x5da/0x870 [ 33.101154] refcount_dec_and_mutex_lock+0x1c/0x80 [ 33.106139] nbd_genl_connect+0x11ee/0x1630 [ 33.110444] ? nbd_xmit_timeout+0x730/0x730 [ 33.114749] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 33.119920] ? validate_nla+0x270/0x820 [ 33.123874] ? nla_parse+0x1b2/0x290 [ 33.127572] genl_family_rcv_msg+0x642/0xc40 [ 33.131961] ? genl_rcv+0x40/0x40 [ 33.135393] ? genl_rcv_msg+0x12f/0x160 [ 33.139346] ? mutex_trylock+0x1a0/0x1a0 [ 33.143392] ? __radix_tree_lookup+0x216/0x370 [ 33.147956] genl_rcv_msg+0xbf/0x160 [ 33.151655] netlink_rcv_skb+0x160/0x440 [ 33.155695] ? genl_family_rcv_msg+0xc40/0xc40 [ 33.160259] ? netlink_ack+0xae0/0xae0 [ 33.164125] ? genl_rcv+0x15/0x40 [ 33.167560] genl_rcv+0x24/0x40 [ 33.170817] netlink_unicast+0x4d5/0x690 [ 33.174859] ? netlink_sendskb+0x110/0x110 [ 33.179071] ? _copy_from_iter_full+0x229/0x7c0 [ 33.183724] ? __phys_addr_symbol+0x2c/0x70 [ 33.188028] ? __check_object_size+0x17b/0x3e0 [ 33.192591] netlink_sendmsg+0x6c3/0xc50 [ 33.196639] ? aa_af_perm+0x230/0x230 [ 33.200418] ? nlmsg_notify+0x1f0/0x1f0 [ 33.204371] ? kernel_recvmsg+0x220/0x220 [ 33.208512] ? nlmsg_notify+0x1f0/0x1f0 [ 33.212465] sock_sendmsg+0xc3/0x120 [ 33.216157] ___sys_sendmsg+0x7bb/0x8e0 [ 33.220111] ? copy_msghdr_from_user+0x440/0x440 [ 33.224851] ? netlink_dump+0xc10/0xc10 [ 33.228812] ? nlmsg_notify+0x1f0/0x1f0 [ 33.232770] ? security_socket_recvmsg+0x8f/0xc0 [ 33.237506] ? __sys_recvfrom+0x2cd/0x3a0 [ 33.241632] ? __ia32_sys_send+0x100/0x100 [ 33.245851] ? __fdget+0x1a0/0x230 [ 33.249373] __x64_sys_sendmsg+0x132/0x220 [ 33.253587] ? __sys_sendmsg+0x1b0/0x1b0 [ 33.257638] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.262984] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.267978] ? do_syscall_64+0x21/0x620 [ 33.271932] do_syscall_64+0xf9/0x620 [ 33.275715] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.280884] RIP: 0033:0x7f652b1657b9 [ 33.284575] 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 [ 33.303455] RSP: 002b:00007ffc7d790208 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 33.311144] RAX: ffffffffffffffda RBX: 00000000000080a7 RCX: 00007f652b1657b9 [ 33.318392] RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 [ 33.325638] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffc7d7903a8 [ 33.332888] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc7d79021c [ 33.340136] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 33.347389] [ 33.348994] Allocated by task 8189: [ 33.352619] kmem_cache_alloc_trace+0x12f/0x380 [ 33.357269] nbd_dev_add+0x44/0x890 [ 33.360884] nbd_genl_connect+0x4cc/0x1630 [ 33.365114] genl_family_rcv_msg+0x642/0xc40 [ 33.369496] genl_rcv_msg+0xbf/0x160 [ 33.373189] netlink_rcv_skb+0x160/0x440 [ 33.377224] genl_rcv+0x24/0x40 [ 33.380478] netlink_unicast+0x4d5/0x690 [ 33.384517] netlink_sendmsg+0x6c3/0xc50 [ 33.388554] sock_sendmsg+0xc3/0x120 [ 33.392248] ___sys_sendmsg+0x7bb/0x8e0 [ 33.396206] __x64_sys_sendmsg+0x132/0x220 [ 33.400425] do_syscall_64+0xf9/0x620 [ 33.404204] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.409386] [ 33.410989] Freed by task 8195: [ 33.414245] kfree+0xcc/0x210 [ 33.417329] nbd_put.part.0+0xfe/0x140 [ 33.421192] nbd_config_put+0x6a0/0x870 [ 33.425153] nbd_genl_connect+0x11bb/0x1630 [ 33.429450] genl_family_rcv_msg+0x642/0xc40 [ 33.433833] genl_rcv_msg+0xbf/0x160 [ 33.437525] netlink_rcv_skb+0x160/0x440 [ 33.441563] genl_rcv+0x24/0x40 [ 33.444820] netlink_unicast+0x4d5/0x690 [ 33.448857] netlink_sendmsg+0x6c3/0xc50 [ 33.452896] sock_sendmsg+0xc3/0x120 [ 33.456601] ___sys_sendmsg+0x7bb/0x8e0 [ 33.460562] __x64_sys_sendmsg+0x132/0x220 [ 33.464776] do_syscall_64+0xf9/0x620 [ 33.468570] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.473747] [ 33.475356] The buggy address belongs to the object at ffff88809b123800 [ 33.475356] which belongs to the cache kmalloc-512 of size 512 [ 33.487989] The buggy address is located 216 bytes inside of [ 33.487989] 512-byte region [ffff88809b123800, ffff88809b123a00) [ 33.499837] The buggy address belongs to the page: [ 33.504755] page:ffffea00026c48c0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88809b123a80 [ 33.514185] flags: 0xfff00000000100(slab) [ 33.518313] raw: 00fff00000000100 ffffea00026a4508 ffffea0002ad8388 ffff88813bff0940 [ 33.526172] raw: ffff88809b123a80 ffff88809b123080 0000000100000003 0000000000000000 [ 33.534030] page dumped because: kasan: bad access detected [ 33.539801] [ 33.541406] Memory state around the buggy address: [ 33.546313] ffff88809b123780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.553738] ffff88809b123800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.561077] >ffff88809b123880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.568426] ^ [ 33.574637] ffff88809b123900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.581975] ffff88809b123980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.589310] ================================================================== [ 33.596746] Disabling lock debugging due to kernel taint [ 33.603895] Kernel panic - not syncing: panic_on_warn set ... [ 33.603895] [ 33.611264] CPU: 0 PID: 8195 Comm: syz-executor332 Tainted: G B 4.19.211-syzkaller #0 [ 33.620525] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.629868] Call Trace: [ 33.632449] dump_stack+0x1fc/0x2ef [ 33.636081] panic+0x26a/0x50e [ 33.639273] ? __warn_printk+0xf3/0xf3 [ 33.643154] ? preempt_schedule_common+0x45/0xc0 [ 33.647893] ? ___preempt_schedule+0x16/0x18 [ 33.652300] ? trace_hardirqs_on+0x55/0x210 [ 33.656604] kasan_end_report+0x43/0x49 [ 33.660556] kasan_report_error.cold+0xa7/0x1b9 [ 33.665210] ? refcount_dec_not_one+0x71/0x1d0 [ 33.669768] kasan_report+0x8f/0xa0 [ 33.673375] ? refcount_dec_not_one+0x71/0x1d0 [ 33.677953] refcount_dec_not_one+0x71/0x1d0 [ 33.682341] ? refcount_dec_and_test_checked+0x20/0x20 [ 33.687597] ? nbd_config_put+0x5da/0x870 [ 33.691726] refcount_dec_and_mutex_lock+0x1c/0x80 [ 33.696635] nbd_genl_connect+0x11ee/0x1630 [ 33.700948] ? nbd_xmit_timeout+0x730/0x730 [ 33.705252] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 33.710423] ? validate_nla+0x270/0x820 [ 33.714383] ? nla_parse+0x1b2/0x290 [ 33.718080] genl_family_rcv_msg+0x642/0xc40 [ 33.722467] ? genl_rcv+0x40/0x40 [ 33.725901] ? genl_rcv_msg+0x12f/0x160 [ 33.729854] ? mutex_trylock+0x1a0/0x1a0 [ 33.733895] ? __radix_tree_lookup+0x216/0x370 [ 33.738456] genl_rcv_msg+0xbf/0x160 [ 33.742148] netlink_rcv_skb+0x160/0x440 [ 33.746338] ? genl_family_rcv_msg+0xc40/0xc40 [ 33.750901] ? netlink_ack+0xae0/0xae0 [ 33.754767] ? genl_rcv+0x15/0x40 [ 33.758201] genl_rcv+0x24/0x40 [ 33.761461] netlink_unicast+0x4d5/0x690 [ 33.765507] ? netlink_sendskb+0x110/0x110 [ 33.769722] ? _copy_from_iter_full+0x229/0x7c0 [ 33.774371] ? __phys_addr_symbol+0x2c/0x70 [ 33.778869] ? __check_object_size+0x17b/0x3e0 [ 33.783429] netlink_sendmsg+0x6c3/0xc50 [ 33.787469] ? aa_af_perm+0x230/0x230 [ 33.791245] ? nlmsg_notify+0x1f0/0x1f0 [ 33.795195] ? kernel_recvmsg+0x220/0x220 [ 33.799321] ? nlmsg_notify+0x1f0/0x1f0 [ 33.803276] sock_sendmsg+0xc3/0x120 [ 33.806993] ___sys_sendmsg+0x7bb/0x8e0 [ 33.810956] ? copy_msghdr_from_user+0x440/0x440 [ 33.815694] ? netlink_dump+0xc10/0xc10 [ 33.819651] ? nlmsg_notify+0x1f0/0x1f0 [ 33.823615] ? security_socket_recvmsg+0x8f/0xc0 [ 33.828387] ? __sys_recvfrom+0x2cd/0x3a0 [ 33.832527] ? __ia32_sys_send+0x100/0x100 [ 33.836750] ? __fdget+0x1a0/0x230 [ 33.840270] __x64_sys_sendmsg+0x132/0x220 [ 33.844501] ? __sys_sendmsg+0x1b0/0x1b0 [ 33.848546] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.853890] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.858887] ? do_syscall_64+0x21/0x620 [ 33.862842] do_syscall_64+0xf9/0x620 [ 33.866623] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.871793] RIP: 0033:0x7f652b1657b9 [ 33.875524] 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 [ 33.894507] RSP: 002b:00007ffc7d790208 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 33.902213] RAX: ffffffffffffffda RBX: 00000000000080a7 RCX: 00007f652b1657b9 [ 33.909464] RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 [ 33.916710] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffc7d7903a8 [ 33.923973] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc7d79021c [ 33.931221] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 33.938640] Kernel Offset: disabled [ 33.942250] Rebooting in 86400 seconds..