From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f205.google.com (mail-il1-f205.google.com [209.85.166.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EA9B3234 for ; Sun, 24 Aug 2025 06:17:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756016249; cv=none; b=IyVfVtkSKamf+bD1ff+GtM4qgAgC8BtmsyxLTWClSNMYuyNlYEj8JhYR0gEvNCQAde4RK0SmmR0UitLb7z2hD+g5iUcoeMFyX+HTjC/6RSHOUSqzVNKmizw+Y4r0eSxJNPKS+63LmS2jNZ1knXQIn328u18lQpGfMTSIWFKcV6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756016249; c=relaxed/simple; bh=9rNOrL4X+SuOy1UHVFrBf1QixVDjMZcwt6SJzmA7dnw=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=VyEXOsz1kwbluRBPpLTa6/yPU3qPSmSbJSYcfnLr4AmxNo43kyM7td6MvO7cw8tS1ZAfx5O7QD46tGivudSXbrTvBajCM3uG2AXUC/YOlzxYkefjidRcx9hJn2lrAEVQ9EWnY2k/CyLoEbXSGGJjIESg2lomJWt6hmnwy6evQkc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f205.google.com with SMTP id e9e14a558f8ab-3e683419b91so35037465ab.2 for ; Sat, 23 Aug 2025 23:17:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756016246; x=1756621046; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IGpjE2KX0SsaicpKC+vAcYtX57LVz37mFTRb1pRE0dc=; b=DOKRQHieb1GLjQ/XeWD1bDlkEqg+InVLLOfd9gtkKH/LoTBN6IHACx+uaMEmyDzcut lP0VoOGT84yUPFjbmqzbcimUa7Eh5xsfM5fpa0zEyzvItqkBlLqkUNqspMoC1C90qU5i 0/f/C/N71F7Kp58YMtDgRKKqw3ZXCDrOjP4JTOCRtYnJeNbNzSSZa0lkogCkrWS0kVoV d4ucu4aPMSuG2BTCRwUoXrXAyARXKriXBWfm5m8dm2JM9B8ecf8YU/o4+hH2kYawGGFj pimAf7Pcwg0IDw63B6Hn9m/QJSwdgZFXc2qO670rK4kgva1UExtYM/QjIQ3z2/vRMHB5 W5GA== X-Forwarded-Encrypted: i=1; AJvYcCU7lwMvagTun/v8Ad9p1hktOjGueCaiiTRd5ZlgBV7F+RwWhMRXfyN4KXjg+8x58k3pgHXdASjI8rQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwLNBHf3Y2ZdTUtOx1WoWa8VUn7pHKVj5xqCnBCeX9hHvwrBq5e Qtw+kK2viulLdr2mhE7PnX/VLjVcfyvDm1ZfiwDWzGoGqYNqqGsdzO3QD4UfsVUY9uv6sOZ0sWa 2gRqbZ6Z+Dcm9W5b7+qhAr28/a8NENLRvXdCnnmn228FA6NZsLL/Elk+M4B4= X-Google-Smtp-Source: AGHT+IGsArnAv2fZlgoDRxUqUq6Y0UNGK3Kqa4Hf95w2GKNzagP7e8yDHOpQgWIswHgFAM/e1MsicWAp9CIybKC+J4B6653rRDzy Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:ca08:0:b0:3e5:5c80:2cf3 with SMTP id e9e14a558f8ab-3e921d46281mr122467945ab.13.1756016246684; Sat, 23 Aug 2025 23:17:26 -0700 (PDT) Date: Sat, 23 Aug 2025 23:17:26 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <68aaae76.050a0220.37038e.006e.GAE@google.com> Subject: [syzbot] [media?] [usb?] KASAN: slab-use-after-free Read in v4l2_release (2) From: syzbot To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, mchehab@kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 8d245acc1e88 Merge tag 'char-misc-6.17-rc3' of git://git.k.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15f37062580000 kernel config: https://syzkaller.appspot.com/x/.config?x=292f3bc9f654adeb dashboard link: https://syzkaller.appspot.com/bug?extid=a658d41cf8564471775e compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14c267bc580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a8c862580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/924cb94b3bad/disk-8d245acc.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/df04a64e8404/vmlinux-8d245acc.xz kernel image: https://storage.googleapis.com/syzbot-assets/92335877cbf3/bzImage-8d245acc.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+a658d41cf8564471775e@syzkaller.appspotmail.com ================================================================== BUG: KASAN: slab-use-after-free in v4l2_release+0xbd/0x3b0 drivers/media/v4l2-core/v4l2-dev.c:455 Read of size 8 at addr ffff88803380c0c8 by task v4l_id/7890 CPU: 0 UID: 0 PID: 7890 Comm: v4l_id Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 v4l2_release+0xbd/0x3b0 drivers/media/v4l2-core/v4l2-dev.c:455 __fput+0x44c/0xa70 fs/file_table.c:468 fput_close_sync+0x119/0x200 fs/file_table.c:573 __do_sys_close fs/open.c:1587 [inline] __se_sys_close fs/open.c:1572 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1572 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe6c60a7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007fff98873b40 EFLAGS: 00000202 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 00007fe6c675e880 RCX: 00007fe6c60a7407 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fe6c675e6e8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000002 R13: 00007fff98873d70 R14: 00007fe6c6863000 R15: 0000561c633154d8 Allocated by task 6061: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4396 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] hackrf_probe+0xda/0x1360 drivers/media/usb/hackrf/hackrf.c:1351 usb_probe_interface+0x668/0xc30 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694 hub_port_connect drivers/usb/core/hub.c:5566 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5870 [inline] hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 6061: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x18e/0x440 mm/slub.c:4879 hackrf_probe+0xd98/0x1360 drivers/media/usb/hackrf/hackrf.c:1523 usb_probe_interface+0x668/0xc30 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3689 usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694 hub_port_connect drivers/usb/core/hub.c:5566 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5870 [inline] hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88803380c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 200 bytes inside of freed 8192-byte region [ffff88803380c000, ffff88803380e000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x33808 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a442280 ffffea00008ec000 dead000000000006 raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a442280 ffffea00008ec000 dead000000000006 head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000ce0201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 25007805576, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] __do_kmalloc_node mm/slub.c:4364 [inline] __kmalloc_noprof+0x305/0x4f0 mm/slub.c:4377 kmalloc_noprof include/linux/slab.h:909 [inline] kmalloc_array_noprof include/linux/slab.h:948 [inline] mb_cache_create+0x15f/0x540 fs/mbcache.c:368 __ext4_fill_super fs/ext4/super.c:5447 [inline] ext4_fill_super+0x40a9/0x6090 fs/ext4/super.c:5728 get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1692 vfs_get_tree+0x92/0x2b0 fs/super.c:1815 do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808 init_mount+0xbb/0x100 fs/init.c:25 do_mount_root+0xf4/0x260 init/do_mounts.c:165 mount_root_generic+0x198/0x350 init/do_mounts.c:204 prepare_namespace+0x71/0xa0 init/do_mounts.c:491 page_owner free stack trace missing Memory state around the buggy address: ffff88803380bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803380c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803380c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803380c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803380c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup