================================================================== BUG: KASAN: slab-use-after-free in load_firmware_cb+0xbc/0x14f4 drivers/media/tuners/xc2028.c:1372 Read of size 8 at addr ffff0000c9fd8318 by task kworker/1:0/24 CPU: 1 UID: 0 PID: 24 Comm: kworker/1:0 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Workqueue: events request_firmware_work_func Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 load_firmware_cb+0xbc/0x14f4 drivers/media/tuners/xc2028.c:1372 request_firmware_work_func+0xe8/0x19c drivers/base/firmware_loader/main.c:1161 process_one_work+0x7e8/0x155c kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3427 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Allocated by task 6879: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:573 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5646 [inline] __kmalloc_noprof+0x3fc/0x728 mm/slub.c:5658 kmalloc_noprof include/linux/slab.h:961 [inline] tomoyo_realpath_from_path+0xc4/0x4d4 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x178/0x31c security/tomoyo/file.c:771 tomoyo_file_open+0x154/0x1ec security/tomoyo/tomoyo.c:334 security_file_open+0xc8/0x298 security/security.c:3183 do_dentry_open+0x2a0/0x10bc fs/open.c:942 vfs_open+0x44/0x2d4 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x2424/0x2c40 fs/namei.c:4134 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:724 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Freed by task 6879: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 __kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2539 [inline] slab_free mm/slub.c:6634 [inline] kfree+0x184/0x600 mm/slub.c:6841 tomoyo_realpath_from_path+0x48c/0x4d4 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x178/0x31c security/tomoyo/file.c:771 tomoyo_file_open+0x154/0x1ec security/tomoyo/tomoyo.c:334 security_file_open+0xc8/0x298 security/security.c:3183 do_dentry_open+0x2a0/0x10bc fs/open.c:942 vfs_open+0x44/0x2d4 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x2424/0x2c40 fs/namei.c:4134 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:724 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000c9fd8000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 792 bytes inside of freed 4096-byte region [ffff0000c9fd8000, ffff0000c9fd9000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109fd8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0002140 0000000000000000 0000000000000001 raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0002140 0000000000000000 0000000000000001 head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc327f601 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c9fd8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c9fd8280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000c9fd8300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c9fd8380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c9fd8400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff800000000005 KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff800000000005] address between user and kernel address ranges