general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 4384 Comm: syz-executor.2 Not tainted 5.10.56 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:scsi_command_size include/scsi/scsi_common.h:24 [inline] RIP: 0010:scsi_setup_scsi_cmnd drivers/scsi/scsi_lib.c:1197 [inline] RIP: 0010:scsi_prepare_cmd drivers/scsi/scsi_lib.c:1581 [inline] RIP: 0010:scsi_queue_rq+0x1eb1/0x2a70 drivers/scsi/scsi_lib.c:1670 Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 46 0b 00 00 48 8b 8b 40 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 ca 48 c1 ea 03 <0f> b6 04 02 48 89 ca 83 e2 07 38 d0 7f 08 84 c0 0f 85 48 0b 00 00 RSP: 0018:ffff888045daf3c0 EFLAGS: 00010256 RAX: dffffc0000000000 RBX: ffff88800e06f000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff829518be RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000001 R09: ffff88800e06f248 R10: 0000000000000000 R11: 0000000000000001 R12: ffff88800e06f240 R13: ffff88800f16e000 R14: 0000000000000000 R15: ffff88800f0dc000 FS: 00007fec407fe700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201d817f CR3: 0000000021c22000 CR4: 0000000000350ee0 Call Trace: blk_mq_dispatch_rq_list+0x36d/0x1bb0 block/blk-mq.c:1389 __blk_mq_sched_dispatch_requests+0x263/0x490 block/blk-mq-sched.c:308 blk_mq_sched_dispatch_requests+0xfb/0x180 block/blk-mq-sched.c:341 __blk_mq_run_hw_queue+0x12c/0x290 block/blk-mq.c:1533 __blk_mq_delay_run_hw_queue+0x4f1/0x550 block/blk-mq.c:1610 blk_mq_run_hw_queue+0x16c/0x2f0 block/blk-mq.c:1663 blk_mq_sched_insert_request+0x380/0x440 block/blk-mq-sched.c:469 blk_execute_rq+0xd4/0x1b0 block/blk-exec.c:86 sg_io+0x60d/0xf70 block/scsi_ioctl.c:360 scsi_cmd_ioctl+0x522/0x590 block/scsi_ioctl.c:809 scsi_cmd_blk_ioctl block/scsi_ioctl.c:867 [inline] scsi_cmd_blk_ioctl+0xe1/0x130 block/scsi_ioctl.c:858 cdrom_ioctl+0xc4/0x2bb0 drivers/cdrom/cdrom.c:3361 sr_block_ioctl+0x141/0x1a0 drivers/scsi/sr.c:596 __blkdev_driver_ioctl block/ioctl.c:237 [inline] blkdev_ioctl+0x28d/0x700 block/ioctl.c:632 block_ioctl+0xf9/0x140 fs/block_dev.c:1893 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fec407fe188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000020000540 RSI: 0000000000002285 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd27fdf69f R14: 00007fec407fe300 R15: 0000000000022000 Modules linked in: ---[ end trace 40b86f476187f5c5 ]--- RIP: 0010:scsi_command_size include/scsi/scsi_common.h:24 [inline] RIP: 0010:scsi_setup_scsi_cmnd drivers/scsi/scsi_lib.c:1197 [inline] RIP: 0010:scsi_prepare_cmd drivers/scsi/scsi_lib.c:1581 [inline] RIP: 0010:scsi_queue_rq+0x1eb1/0x2a70 drivers/scsi/scsi_lib.c:1670 Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 46 0b 00 00 48 8b 8b 40 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 ca 48 c1 ea 03 <0f> b6 04 02 48 89 ca 83 e2 07 38 d0 7f 08 84 c0 0f 85 48 0b 00 00 RSP: 0018:ffff888045daf3c0 EFLAGS: 00010256 RAX: dffffc0000000000 RBX: ffff88800e06f000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff829518be RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000001 R09: ffff88800e06f248 R10: 0000000000000000 R11: 0000000000000001 R12: ffff88800e06f240 R13: ffff88800f16e000 R14: 0000000000000000 R15: ffff88800f0dc000 FS: 00007fec407fe700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201d817f CR3: 0000000021c22000 CR4: 0000000000350ee0 note: syz-executor.2[4384] exited with preempt_count 2 ================================================================== BUG: KASAN: use-after-free in mutex_can_spin_on_owner kernel/locking/mutex.c:615 [inline] BUG: KASAN: use-after-free in mutex_optimistic_spin kernel/locking/mutex.c:659 [inline] BUG: KASAN: use-after-free in __mutex_lock_common kernel/locking/mutex.c:972 [inline] BUG: KASAN: use-after-free in __mutex_lock+0x10ec/0x1230 kernel/locking/mutex.c:1114 Read of size 4 at addr ffff888015ba32ac by task syz-executor.2/4393 CPU: 1 PID: 4393 Comm: syz-executor.2 Tainted: G D 5.10.56 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x210 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:562 mutex_can_spin_on_owner kernel/locking/mutex.c:615 [inline] mutex_optimistic_spin kernel/locking/mutex.c:659 [inline] __mutex_lock_common kernel/locking/mutex.c:972 [inline] __mutex_lock+0x10ec/0x1230 kernel/locking/mutex.c:1114 sr_block_ioctl+0xa9/0x1a0 drivers/scsi/sr.c:576 __blkdev_driver_ioctl block/ioctl.c:237 [inline] blkdev_ioctl+0x28d/0x700 block/ioctl.c:632 block_ioctl+0xf9/0x140 fs/block_dev.c:1893 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fec407dd188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000000002201 RDI: 0000000000000004 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c038 R13: 00007ffd27fdf69f R14: 00007fec407dd300 R15: 0000000000022000 Allocated by task 4379: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:532 [inline] slab_alloc_node mm/slub.c:2889 [inline] kmem_cache_alloc_node+0x14b/0x370 mm/slub.c:2925 alloc_task_struct_node kernel/fork.c:170 [inline] dup_task_struct kernel/fork.c:860 [inline] copy_process+0x4380/0x6650 kernel/fork.c:1947 kernel_clone+0xe7/0xa20 kernel/fork.c:2465 __do_sys_clone+0xc8/0x110 kernel/fork.c:2582 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 75: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x110/0x150 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1542 [inline] slab_free_freelist_hook+0x64/0x150 mm/slub.c:1575 slab_free mm/slub.c:3140 [inline] kmem_cache_free+0x97/0x2f0 mm/slub.c:3156 __put_task_struct+0x25a/0x3e0 kernel/fork.c:741 put_task_struct include/linux/sched/task.h:113 [inline] delayed_put_task_struct+0x1a4/0x2b0 kernel/exit.c:173 rcu_do_batch kernel/rcu/tree.c:2484 [inline] rcu_core+0x52d/0x1660 kernel/rcu/tree.c:2719 __do_softirq+0x1b8/0x867 kernel/softirq.c:298 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x9e/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2960 [inline] call_rcu+0x8a/0xa20 kernel/rcu/tree.c:3034 put_task_struct_rcu_user+0x7f/0xb0 kernel/exit.c:179 finish_task_switch+0x428/0x5d0 kernel/sched/core.c:3649 schedule_tail+0xf/0x1c0 kernel/sched/core.c:3711 ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:281 Second to last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x9e/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2960 [inline] call_rcu+0x8a/0xa20 kernel/rcu/tree.c:3034 put_task_struct_rcu_user+0x7f/0xb0 kernel/exit.c:179 wait_task_zombie kernel/exit.c:1093 [inline] wait_consider_task+0x2f21/0x3b70 kernel/exit.c:1320 do_wait_thread kernel/exit.c:1383 [inline] do_wait+0x350/0x900 kernel/exit.c:1454 kernel_wait4+0x14c/0x260 kernel/exit.c:1616 __do_sys_wait4+0x13f/0x150 kernel/exit.c:1644 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888015ba3280 which belongs to the cache task_struct of size 6208 The buggy address is located 44 bytes inside of 6208-byte region [ffff888015ba3280, ffff888015ba4ac0) The buggy address belongs to the page: page:00000000664026a9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15ba0 head:00000000664026a9 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x100000000010200(slab|head) raw: 0100000000010200 0000000000000000 0000000100000001 ffff888007fdc140 raw: 0000000000000000 0000000000050005 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888015ba3180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015ba3200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888015ba3280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888015ba3300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888015ba3380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs (loop0): Unrecognized mount option "subj_role='#" or missing value syz-executor.7 (4377) used greatest stack depth: 23856 bytes left