Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.108' (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 syzkaller login: [ 36.058155] ================================================================== [ 36.065609] BUG: KASAN: use-after-free in refcount_dec_not_one+0x71/0x1d0 [ 36.072526] Read of size 4 at addr ffff8880a9c56418 by task syz-executor189/8494 [ 36.080045] [ 36.081681] CPU: 0 PID: 8494 Comm: syz-executor189 Not tainted 4.19.211-syzkaller #0 [ 36.089540] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 36.098877] Call Trace: [ 36.101455] dump_stack+0x1fc/0x2ef [ 36.105072] print_address_description.cold+0x54/0x219 [ 36.110338] kasan_report_error.cold+0x8a/0x1b9 [ 36.114997] ? refcount_dec_not_one+0x71/0x1d0 [ 36.119578] kasan_report+0x8f/0xa0 [ 36.123203] ? refcount_dec_not_one+0x71/0x1d0 [ 36.127781] refcount_dec_not_one+0x71/0x1d0 [ 36.132194] ? refcount_dec_and_test_checked+0x20/0x20 [ 36.137461] ? nbd_config_put+0x5da/0x870 [ 36.141598] refcount_dec_and_mutex_lock+0x1c/0x80 [ 36.146520] nbd_genl_connect+0x11ee/0x1630 [ 36.150832] ? nbd_xmit_timeout+0x730/0x730 [ 36.155151] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 36.160327] ? validate_nla+0x270/0x820 [ 36.164289] ? nla_parse+0x1b2/0x290 [ 36.168023] genl_family_rcv_msg+0x642/0xc40 [ 36.172422] ? genl_rcv+0x40/0x40 [ 36.175871] ? genl_rcv_msg+0x12f/0x160 [ 36.179839] ? mutex_trylock+0x1a0/0x1a0 [ 36.183888] ? __radix_tree_lookup+0x216/0x370 [ 36.188458] genl_rcv_msg+0xbf/0x160 [ 36.192158] netlink_rcv_skb+0x160/0x440 [ 36.196218] ? genl_family_rcv_msg+0xc40/0xc40 [ 36.200811] ? netlink_ack+0xae0/0xae0 [ 36.204684] ? genl_rcv+0x15/0x40 [ 36.208123] genl_rcv+0x24/0x40 [ 36.211387] netlink_unicast+0x4d5/0x690 [ 36.215492] ? netlink_sendskb+0x110/0x110 [ 36.219714] ? _copy_from_iter_full+0x229/0x7c0 [ 36.224380] ? __phys_addr_symbol+0x2c/0x70 [ 36.228698] ? __check_object_size+0x17b/0x3e0 [ 36.233280] netlink_sendmsg+0x6c3/0xc50 [ 36.237339] ? aa_af_perm+0x230/0x230 [ 36.241124] ? nlmsg_notify+0x1f0/0x1f0 [ 36.245077] ? kernel_recvmsg+0x220/0x220 [ 36.249226] ? nlmsg_notify+0x1f0/0x1f0 [ 36.253206] sock_sendmsg+0xc3/0x120 [ 36.256906] ___sys_sendmsg+0x7bb/0x8e0 [ 36.260878] ? copy_msghdr_from_user+0x440/0x440 [ 36.265624] ? netlink_dump+0xc10/0xc10 [ 36.269589] ? nlmsg_notify+0x1f0/0x1f0 [ 36.273555] ? security_socket_recvmsg+0x8f/0xc0 [ 36.278297] ? __sys_recvfrom+0x2cd/0x3a0 [ 36.282427] ? __ia32_sys_send+0x100/0x100 [ 36.286655] ? __fdget+0x1a0/0x230 [ 36.290202] __x64_sys_sendmsg+0x132/0x220 [ 36.294420] ? __sys_sendmsg+0x1b0/0x1b0 [ 36.298474] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 36.303821] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.308857] ? do_syscall_64+0x21/0x620 [ 36.312818] do_syscall_64+0xf9/0x620 [ 36.316609] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.321782] RIP: 0033:0x7f0d266df919 [ 36.325489] 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.344384] RSP: 002b:00007ffe4a83e1f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 36.352080] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f0d266df919 [ 36.359348] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 36.366603] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 36.373876] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000008b6a [ 36.381138] R13: 00007ffe4a83e20c R14: 00007ffe4a83e220 R15: 00007ffe4a83e210 [ 36.388502] [ 36.390116] Allocated by task 8486: [ 36.393738] kmem_cache_alloc_trace+0x12f/0x380 [ 36.398393] nbd_dev_add+0x44/0x890 [ 36.402014] nbd_genl_connect+0x4cc/0x1630 [ 36.406241] genl_family_rcv_msg+0x642/0xc40 [ 36.410633] genl_rcv_msg+0xbf/0x160 [ 36.414330] netlink_rcv_skb+0x160/0x440 [ 36.418373] genl_rcv+0x24/0x40 [ 36.421635] netlink_unicast+0x4d5/0x690 [ 36.425679] netlink_sendmsg+0x6c3/0xc50 [ 36.429728] sock_sendmsg+0xc3/0x120 [ 36.433448] ___sys_sendmsg+0x7bb/0x8e0 [ 36.437411] __x64_sys_sendmsg+0x132/0x220 [ 36.441640] do_syscall_64+0xf9/0x620 [ 36.445441] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.450609] [ 36.452224] Freed by task 8494: [ 36.455503] kfree+0xcc/0x210 [ 36.458597] nbd_put.part.0+0xfe/0x140 [ 36.462479] nbd_config_put+0x6a0/0x870 [ 36.466436] nbd_genl_connect+0x11bb/0x1630 [ 36.470745] genl_family_rcv_msg+0x642/0xc40 [ 36.475140] genl_rcv_msg+0xbf/0x160 [ 36.478839] netlink_rcv_skb+0x160/0x440 [ 36.482886] genl_rcv+0x24/0x40 [ 36.486159] netlink_unicast+0x4d5/0x690 [ 36.490208] netlink_sendmsg+0x6c3/0xc50 [ 36.494254] sock_sendmsg+0xc3/0x120 [ 36.497972] ___sys_sendmsg+0x7bb/0x8e0 [ 36.501935] __x64_sys_sendmsg+0x132/0x220 [ 36.506167] do_syscall_64+0xf9/0x620 [ 36.509969] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.515134] [ 36.516757] The buggy address belongs to the object at ffff8880a9c56340 [ 36.516757] which belongs to the cache kmalloc-512 of size 512 [ 36.529418] The buggy address is located 216 bytes inside of [ 36.529418] 512-byte region [ffff8880a9c56340, ffff8880a9c56540) [ 36.541286] The buggy address belongs to the page: [ 36.546204] page:ffffea0002a71580 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 [ 36.554333] flags: 0xfff00000000100(slab) [ 36.558490] raw: 00fff00000000100 ffffea0002a73b88 ffffea0002a793c8 ffff88813bff0940 [ 36.566368] raw: 0000000000000000 ffff8880a9c560c0 0000000100000006 0000000000000000 [ 36.574226] page dumped because: kasan: bad access detected [ 36.579934] [ 36.581546] Memory state around the buggy address: [ 36.586475] ffff8880a9c56300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 36.593831] ffff8880a9c56380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.601184] >ffff8880a9c56400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.608524] ^ [ 36.612663] ffff8880a9c56480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.620029] ffff8880a9c56500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 36.627381] ================================================================== [ 36.634727] Disabling lock debugging due to kernel taint [ 36.640413] Kernel panic - not syncing: panic_on_warn set ... [ 36.640413] [ 36.647791] CPU: 1 PID: 8494 Comm: syz-executor189 Tainted: G B 4.19.211-syzkaller #0 [ 36.657183] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 36.668120] Call Trace: [ 36.670709] dump_stack+0x1fc/0x2ef [ 36.674340] panic+0x26a/0x50e [ 36.677531] ? __warn_printk+0xf3/0xf3 [ 36.681419] ? preempt_schedule_common+0x45/0xc0 [ 36.686168] ? ___preempt_schedule+0x16/0x18 [ 36.690576] ? trace_hardirqs_on+0x55/0x210 [ 36.694880] kasan_end_report+0x43/0x49 [ 36.698840] kasan_report_error.cold+0xa7/0x1b9 [ 36.703505] ? refcount_dec_not_one+0x71/0x1d0 [ 36.708065] kasan_report+0x8f/0xa0 [ 36.711672] ? refcount_dec_not_one+0x71/0x1d0 [ 36.716234] refcount_dec_not_one+0x71/0x1d0 [ 36.720644] ? refcount_dec_and_test_checked+0x20/0x20 [ 36.725903] ? nbd_config_put+0x5da/0x870 [ 36.730029] refcount_dec_and_mutex_lock+0x1c/0x80 [ 36.734939] nbd_genl_connect+0x11ee/0x1630 [ 36.739241] ? nbd_xmit_timeout+0x730/0x730 [ 36.745019] ? __sanitizer_cov_trace_switch+0x4b/0x80 [ 36.750190] ? validate_nla+0x270/0x820 [ 36.754149] ? nla_parse+0x1b2/0x290 [ 36.757843] genl_family_rcv_msg+0x642/0xc40 [ 36.762242] ? genl_rcv+0x40/0x40 [ 36.765675] ? genl_rcv_msg+0x12f/0x160 [ 36.769629] ? mutex_trylock+0x1a0/0x1a0 [ 36.773681] ? __radix_tree_lookup+0x216/0x370 [ 36.778245] genl_rcv_msg+0xbf/0x160 [ 36.781947] netlink_rcv_skb+0x160/0x440 [ 36.785989] ? genl_family_rcv_msg+0xc40/0xc40 [ 36.790552] ? netlink_ack+0xae0/0xae0 [ 36.794427] ? genl_rcv+0x15/0x40 [ 36.797863] genl_rcv+0x24/0x40 [ 36.801138] netlink_unicast+0x4d5/0x690 [ 36.805182] ? netlink_sendskb+0x110/0x110 [ 36.809413] ? _copy_from_iter_full+0x229/0x7c0 [ 36.814088] ? __phys_addr_symbol+0x2c/0x70 [ 36.818393] ? __check_object_size+0x17b/0x3e0 [ 36.822958] netlink_sendmsg+0x6c3/0xc50 [ 36.827033] ? aa_af_perm+0x230/0x230 [ 36.830834] ? nlmsg_notify+0x1f0/0x1f0 [ 36.834796] ? kernel_recvmsg+0x220/0x220 [ 36.838965] ? nlmsg_notify+0x1f0/0x1f0 [ 36.842930] sock_sendmsg+0xc3/0x120 [ 36.846639] ___sys_sendmsg+0x7bb/0x8e0 [ 36.850602] ? copy_msghdr_from_user+0x440/0x440 [ 36.855343] ? netlink_dump+0xc10/0xc10 [ 36.859300] ? nlmsg_notify+0x1f0/0x1f0 [ 36.863262] ? security_socket_recvmsg+0x8f/0xc0 [ 36.867999] ? __sys_recvfrom+0x2cd/0x3a0 [ 36.872129] ? __ia32_sys_send+0x100/0x100 [ 36.876349] ? __fdget+0x1a0/0x230 [ 36.879872] __x64_sys_sendmsg+0x132/0x220 [ 36.884091] ? __sys_sendmsg+0x1b0/0x1b0 [ 36.888138] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 36.893510] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.898525] ? do_syscall_64+0x21/0x620 [ 36.902614] do_syscall_64+0xf9/0x620 [ 36.906416] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.911595] RIP: 0033:0x7f0d266df919 [ 36.915296] 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.934198] RSP: 002b:00007ffe4a83e1f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 36.941899] RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f0d266df919 [ 36.949234] RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000003 [ 36.956488] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 36.963744] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000008b6a [ 36.971009] R13: 00007ffe4a83e20c R14: 00007ffe4a83e220 R15: 00007ffe4a83e210 [ 36.978453] Kernel Offset: disabled [ 36.982071] Rebooting in 86400 seconds..