================================================================== BUG: KASAN: slab-use-after-free in dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99 Read of size 8 at addr ffff888026cd2c18 by task syz.1.1750/14227 CPU: 0 PID: 14227 Comm: syz.1.1750 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99 chrdev_open+0x5cc/0x6a0 fs/char_dev.c:414 do_dentry_open+0x8c6/0x1500 fs/open.c:929 do_open fs/namei.c:3640 [inline] path_openat+0x27f1/0x3230 fs/namei.c:3797 do_filp_open+0x1f5/0x430 fs/namei.c:3824 do_sys_openat2+0x134/0x1d0 fs/open.c:1421 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1447 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9a7b35d68e Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007f9a795f5b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f9a795f66c0 RCX: 00007f9a7b35d68e RDX: 0000000000000002 RSI: 00007f9a795f5c00 RDI: ffffffffffffff9c RBP: 00007f9a795f5c00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd R13: 00007f9a7b616038 R14: 00007f9a7b615fa0 R15: 00007fff6bf3a5f8 Allocated by task 13141: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc_node_track_caller+0xb2/0x230 mm/slab_common.c:1027 __do_krealloc mm/slab_common.c:1402 [inline] krealloc+0x86/0x120 mm/slab_common.c:1435 copy_array+0x64/0xf0 kernel/bpf/verifier.c:1591 copy_stack_state kernel/bpf/verifier.c:1645 [inline] copy_func_state kernel/bpf/verifier.c:1774 [inline] copy_verifier_state+0x7f3/0xd20 kernel/bpf/verifier.c:1815 is_state_visited kernel/bpf/verifier.c:17005 [inline] do_check+0x3b6f/0xdf40 kernel/bpf/verifier.c:17165 do_check_common+0xadb/0x13e0 kernel/bpf/verifier.c:19785 do_check_main kernel/bpf/verifier.c:19848 [inline] bpf_check+0x658e/0xeba0 kernel/bpf/verifier.c:20516 bpf_prog_load+0x1163/0x1670 kernel/bpf/syscall.c:2753 __sys_bpf+0x5ba/0x890 kernel/bpf/syscall.c:5477 __do_sys_bpf kernel/bpf/syscall.c:5581 [inline] __se_sys_bpf kernel/bpf/syscall.c:5579 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5579 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 kvfree_call_rcu+0xee/0x790 kernel/rcu/tree.c:3452 drop_sysctl_table+0x394/0x540 fs/proc/proc_sysctl.c:1515 drop_sysctl_table+0x3ab/0x540 fs/proc/proc_sysctl.c:1518 unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1536 __devinet_sysctl_unregister net/ipv4/devinet.c:2656 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2684 [inline] inetdev_destroy net/ipv4/devinet.c:330 [inline] inetdev_event+0x79a/0x1630 net/ipv4/devinet.c:1636 notifier_call_chain+0x197/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x100d/0x1900 net/core/dev.c:11124 ip_tunnel_delete_nets+0x324/0x370 net/ipv4/ip_tunnel.c:1157 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x795/0xbb0 net/core/net_namespace.c:652 process_one_work kernel/workqueue.c:2653 [inline] process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2730 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2811 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 insert_work+0x3d/0x310 kernel/workqueue.c:1670 __queue_work+0xc39/0x1020 kernel/workqueue.c:1819 queue_work_on+0x128/0x1f0 kernel/workqueue.c:1854 run_delalloc_compressed fs/btrfs/inode.c:1705 [inline] btrfs_run_delalloc_range+0xdc8/0x10e0 fs/btrfs/inode.c:2287 writepage_delalloc+0xd8/0x220 fs/btrfs/extent_io.c:1235 __extent_writepage fs/btrfs/extent_io.c:1486 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2161 [inline] extent_writepages+0x1115/0x2940 fs/btrfs/extent_io.c:2281 do_writepages+0x3b3/0x630 mm/page-writeback.c:2575 filemap_fdatawrite_wbc+0x122/0x180 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] filemap_fdatawrite_range+0xf7/0x160 mm/filemap.c:441 btrfs_fdatawrite_range fs/btrfs/file.c:3942 [inline] btrfs_direct_write fs/btrfs/file.c:1635 [inline] btrfs_do_write_iter+0xb72/0x1220 fs/btrfs/file.c:1702 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x738/0xc30 fs/read_write.c:860 iter_file_splice_write+0x6a3/0xcb0 fs/splice.c:736 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0xe8/0x130 fs/splice.c:1142 splice_direct_to_actor+0x304/0x8c0 fs/splice.c:1088 do_splice_direct+0x1d5/0x2f0 fs/splice.c:1194 do_sendfile+0x5f2/0xef0 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64+0x145/0x1a0 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888026cd2c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 24 bytes inside of freed 256-byte region [ffff888026cd2c00, ffff888026cd2d00) The buggy address belongs to the physical page: page:ffffea00009b3480 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888026cd2c00 pfn:0x26cd2 head:ffffea00009b3480 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888017c41b40 ffffea0000911510 ffffea0001981310 raw: ffff888026cd2c00 000000000010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 17657308257, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581 prep_new_page mm/page_alloc.c:1588 [inline] get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2118 alloc_slab_page+0x5d/0x160 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] __kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] bus_add_driver+0x162/0x630 drivers/base/bus.c:700 driver_register+0x23a/0x310 drivers/base/driver.c:246 usb_register_driver+0x206/0x3d0 drivers/usb/core/driver.c:1062 do_one_initcall+0x242/0x790 init/main.c:1249 do_initcall_level+0x137/0x1f0 init/main.c:1311 do_initcalls+0x69/0xd0 init/main.c:1327 kernel_init_freeable+0x3ed/0x580 init/main.c:1564 page_owner free stack trace missing Memory state around the buggy address: ffff888026cd2b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026cd2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888026cd2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026cd2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026cd2d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================