Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.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 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 syzkaller login: [ 35.888669] ================================================================== [ 35.896170] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 35.903091] Read of size 4 at addr ffff88809a4b7358 by task syz-executor149/8811 [ 35.910604] [ 35.912230] CPU: 0 PID: 8811 Comm: syz-executor149 Not tainted 4.19.211-syzkaller #0 [ 35.920089] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.929433] Call Trace: [ 35.932011] dump_stack+0x1fc/0x2ef [ 35.935632] print_address_description.cold+0x54/0x219 [ 35.940974] kasan_report_error.cold+0x8a/0x1b9 [ 35.945633] ? refcount_dec_not_one+0x71/0x1d0 [ 35.950197] kasan_report+0x8f/0xa0 [ 35.953808] ? refcount_dec_not_one+0x71/0x1d0 [ 35.958383] refcount_dec_not_one+0x71/0x1d0 [ 35.962778] ? refcount_dec_and_test_checked+0x20/0x20 [ 35.968037] ? nbd_config_put+0x5da/0x870 [ 35.972190] refcount_dec_and_mutex_lock+0x1c/0x80 [ 35.977199] nbd_genl_connect+0x11ee/0x1630 [ 35.981516] ? nbd_xmit_timeout+0x730/0x730 [ 35.985836] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 35.991021] ? validate_nla+0x270/0x820 [ 35.994981] ? nla_parse+0x1b2/0x290 [ 35.998686] genl_family_rcv_msg+0x642/0xc40 [ 36.003075] ? genl_rcv+0x40/0x40 [ 36.006517] ? genl_rcv_msg+0x12f/0x160 [ 36.010473] ? mutex_trylock+0x1a0/0x1a0 [ 36.014518] ? __radix_tree_lookup+0x216/0x370 [ 36.019085] genl_rcv_msg+0xbf/0x160 [ 36.022781] netlink_rcv_skb+0x160/0x440 [ 36.026855] ? genl_family_rcv_msg+0xc40/0xc40 [ 36.031428] ? netlink_ack+0xae0/0xae0 [ 36.035299] ? genl_rcv+0x15/0x40 [ 36.038739] genl_rcv+0x24/0x40 [ 36.042002] netlink_unicast+0x4d5/0x690 [ 36.046044] ? netlink_sendskb+0x110/0x110 [ 36.050270] ? _copy_from_iter_full+0x229/0x7c0 [ 36.054927] ? __phys_addr_symbol+0x2c/0x70 [ 36.059232] ? __check_object_size+0x17b/0x3e0 [ 36.063829] netlink_sendmsg+0x6c3/0xc50 [ 36.067882] ? aa_af_perm+0x230/0x230 [ 36.071666] ? nlmsg_notify+0x1f0/0x1f0 [ 36.075632] ? kernel_recvmsg+0x220/0x220 [ 36.079763] ? nlmsg_notify+0x1f0/0x1f0 [ 36.083719] sock_sendmsg+0xc3/0x120 [ 36.087416] ___sys_sendmsg+0x7bb/0x8e0 [ 36.091371] ? copy_msghdr_from_user+0x440/0x440 [ 36.096105] ? netlink_dump+0xc10/0xc10 [ 36.100059] ? nlmsg_notify+0x1f0/0x1f0 [ 36.104015] ? security_socket_recvmsg+0x8f/0xc0 [ 36.108767] ? __sys_recvfrom+0x2cd/0x3a0 [ 36.112894] ? __ia32_sys_send+0x100/0x100 [ 36.117113] ? __fdget+0x1a0/0x230 [ 36.120635] __x64_sys_sendmsg+0x132/0x220 [ 36.124850] ? __sys_sendmsg+0x1b0/0x1b0 [ 36.128896] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 36.134256] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.139271] ? do_syscall_64+0x21/0x620 [ 36.143226] do_syscall_64+0xf9/0x620 [ 36.147010] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.152176] RIP: 0033:0x7fcf12872bc9 [ 36.155868] 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 [ 36.174750] RSP: 002b:00007ffd7b935d38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 36.182444] RAX: ffffffffffffffda RBX: 00007ffd7b935d80 RCX: 00007fcf12872bc9 [ 36.189694] RDX: 0000000000000080 RSI: 00000000200004c0 RDI: 0000000000000004 [ 36.196953] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fcf128e6ec0 [ 36.204201] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd7b935d70 [ 36.211449] R13: 0000000000008bd7 R14: 00007ffd7b935d6c R15: 431bde82d7b634db [ 36.218714] [ 36.220338] Allocated by task 8805: [ 36.223959] kmem_cache_alloc_trace+0x12f/0x380 [ 36.228607] nbd_dev_add+0x44/0x890 [ 36.232213] nbd_genl_connect+0x4cc/0x1630 [ 36.236428] genl_family_rcv_msg+0x642/0xc40 [ 36.240811] genl_rcv_msg+0xbf/0x160 [ 36.244500] netlink_rcv_skb+0x160/0x440 [ 36.248536] genl_rcv+0x24/0x40 [ 36.251794] netlink_unicast+0x4d5/0x690 [ 36.255830] netlink_sendmsg+0x6c3/0xc50 [ 36.259868] sock_sendmsg+0xc3/0x120 [ 36.263565] ___sys_sendmsg+0x7bb/0x8e0 [ 36.267535] __x64_sys_sendmsg+0x132/0x220 [ 36.271747] do_syscall_64+0xf9/0x620 [ 36.275526] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.280689] [ 36.282293] Freed by task 8811: [ 36.285549] kfree+0xcc/0x210 [ 36.288632] nbd_put.part.0+0xfe/0x140 [ 36.292496] nbd_config_put+0x6a0/0x870 [ 36.296450] nbd_genl_connect+0x11bb/0x1630 [ 36.300752] genl_family_rcv_msg+0x642/0xc40 [ 36.305140] genl_rcv_msg+0xbf/0x160 [ 36.308832] netlink_rcv_skb+0x160/0x440 [ 36.312872] genl_rcv+0x24/0x40 [ 36.316130] netlink_unicast+0x4d5/0x690 [ 36.320255] netlink_sendmsg+0x6c3/0xc50 [ 36.324295] sock_sendmsg+0xc3/0x120 [ 36.327984] ___sys_sendmsg+0x7bb/0x8e0 [ 36.331932] __x64_sys_sendmsg+0x132/0x220 [ 36.336144] do_syscall_64+0xf9/0x620 [ 36.339926] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.345089] [ 36.346698] The buggy address belongs to the object at ffff88809a4b7280 [ 36.346698] which belongs to the cache kmalloc-512 of size 512 [ 36.359330] The buggy address is located 216 bytes inside of [ 36.359330] 512-byte region [ffff88809a4b7280, ffff88809a4b7480) [ 36.371180] The buggy address belongs to the page: [ 36.376088] page:ffffea0002692dc0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88809a4b7500 [ 36.385509] flags: 0xfff00000000100(slab) [ 36.389639] raw: 00fff00000000100 ffffea00026f0808 ffffea0002a459c8 ffff88813bff0940 [ 36.397500] raw: ffff88809a4b7500 ffff88809a4b7000 0000000100000004 0000000000000000 [ 36.405363] page dumped because: kasan: bad access detected [ 36.411047] [ 36.412648] Memory state around the buggy address: [ 36.417553] ffff88809a4b7200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 36.424892] ffff88809a4b7280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.432227] >ffff88809a4b7300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.439558] ^ [ 36.445766] ffff88809a4b7380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.453102] ffff88809a4b7400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.460432] ================================================================== [ 36.467761] Disabling lock debugging due to kernel taint [ 36.475263] Kernel panic - not syncing: panic_on_warn set ... [ 36.475263] [ 36.482630] CPU: 0 PID: 8811 Comm: syz-executor149 Tainted: G B 4.19.211-syzkaller #0 [ 36.491887] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.501233] Call Trace: [ 36.503820] dump_stack+0x1fc/0x2ef [ 36.507445] panic+0x26a/0x50e [ 36.510636] ? __warn_printk+0xf3/0xf3 [ 36.514521] ? preempt_schedule_common+0x45/0xc0 [ 36.519264] ? ___preempt_schedule+0x16/0x18 [ 36.523679] ? trace_hardirqs_on+0x55/0x210 [ 36.527980] kasan_end_report+0x43/0x49 [ 36.531933] kasan_report_error.cold+0xa7/0x1b9 [ 36.536579] ? refcount_dec_not_one+0x71/0x1d0 [ 36.541135] kasan_report+0x8f/0xa0 [ 36.544738] ? refcount_dec_not_one+0x71/0x1d0 [ 36.549295] refcount_dec_not_one+0x71/0x1d0 [ 36.553683] ? refcount_dec_and_test_checked+0x20/0x20 [ 36.558942] ? nbd_config_put+0x5da/0x870 [ 36.563078] refcount_dec_and_mutex_lock+0x1c/0x80 [ 36.567984] nbd_genl_connect+0x11ee/0x1630 [ 36.572284] ? nbd_xmit_timeout+0x730/0x730 [ 36.576584] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 36.581754] ? validate_nla+0x270/0x820 [ 36.585708] ? nla_parse+0x1b2/0x290 [ 36.589400] genl_family_rcv_msg+0x642/0xc40 [ 36.593789] ? genl_rcv+0x40/0x40 [ 36.597219] ? genl_rcv_msg+0x12f/0x160 [ 36.601169] ? mutex_trylock+0x1a0/0x1a0 [ 36.605229] ? __radix_tree_lookup+0x216/0x370 [ 36.609788] genl_rcv_msg+0xbf/0x160 [ 36.613481] netlink_rcv_skb+0x160/0x440 [ 36.617523] ? genl_family_rcv_msg+0xc40/0xc40 [ 36.622082] ? netlink_ack+0xae0/0xae0 [ 36.625948] ? genl_rcv+0x15/0x40 [ 36.629404] genl_rcv+0x24/0x40 [ 36.632669] netlink_unicast+0x4d5/0x690 [ 36.636709] ? netlink_sendskb+0x110/0x110 [ 36.640921] ? _copy_from_iter_full+0x229/0x7c0 [ 36.645568] ? __phys_addr_symbol+0x2c/0x70 [ 36.649883] ? __check_object_size+0x17b/0x3e0 [ 36.654455] netlink_sendmsg+0x6c3/0xc50 [ 36.658498] ? aa_af_perm+0x230/0x230 [ 36.662276] ? nlmsg_notify+0x1f0/0x1f0 [ 36.666232] ? kernel_recvmsg+0x220/0x220 [ 36.670366] ? nlmsg_notify+0x1f0/0x1f0 [ 36.674320] sock_sendmsg+0xc3/0x120 [ 36.678013] ___sys_sendmsg+0x7bb/0x8e0 [ 36.681965] ? copy_msghdr_from_user+0x440/0x440 [ 36.686699] ? netlink_dump+0xc10/0xc10 [ 36.690651] ? nlmsg_notify+0x1f0/0x1f0 [ 36.694610] ? security_socket_recvmsg+0x8f/0xc0 [ 36.699363] ? __sys_recvfrom+0x2cd/0x3a0 [ 36.703488] ? __ia32_sys_send+0x100/0x100 [ 36.707702] ? __fdget+0x1a0/0x230 [ 36.711219] __x64_sys_sendmsg+0x132/0x220 [ 36.715430] ? __sys_sendmsg+0x1b0/0x1b0 [ 36.719471] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 36.724815] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.729807] ? do_syscall_64+0x21/0x620 [ 36.733759] do_syscall_64+0xf9/0x620 [ 36.737539] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.742706] RIP: 0033:0x7fcf12872bc9 [ 36.746398] 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 [ 36.765293] RSP: 002b:00007ffd7b935d38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 36.772992] RAX: ffffffffffffffda RBX: 00007ffd7b935d80 RCX: 00007fcf12872bc9 [ 36.780256] RDX: 0000000000000080 RSI: 00000000200004c0 RDI: 0000000000000004 [ 36.787512] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fcf128e6ec0 [ 36.794757] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd7b935d70 [ 36.802089] R13: 0000000000008bd7 R14: 00007ffd7b935d6c R15: 431bde82d7b634db [ 36.809513] Kernel Offset: disabled [ 36.813133] Rebooting in 86400 seconds..