================================================================== BUG: KASAN: use-after-free in dvb_device_open+0xc5/0x360 drivers/media/dvb-core/dvbdev.c:109 Read of size 8 at addr ffff88814a8fd818 by task syz.2.906/9761 CPU: 1 PID: 9761 Comm: syz.2.906 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 dvb_device_open+0xc5/0x360 drivers/media/dvb-core/dvbdev.c:109 chrdev_open+0x585/0x5f0 fs/char_dev.c:414 do_dentry_open+0x7f7/0xf90 fs/open.c:826 do_open fs/namei.c:3616 [inline] path_openat+0x2718/0x2fb0 fs/namei.c:3750 do_filp_open+0x1df/0x400 fs/namei.c:3777 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f22fc9ab68e 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:00007f22fac43b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f22fac446c0 RCX: 00007f22fc9ab68e RDX: 0000000000040002 RSI: 00007f22fac43c00 RDI: ffffffffffffff9c RBP: 00007f22fac43c00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd R13: 00007f22fcc64038 R14: 00007f22fcc63fa0 R15: 00007ffed72e8758 Allocated by task 3854: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:612 [inline] kzalloc include/linux/slab.h:738 [inline] fib_create_info+0xad1/0x2450 net/ipv4/fib_semantics.c:1478 fib_table_insert+0xe4/0x1b70 net/ipv4/fib_trie.c:1212 inet_rtm_newroute+0x147/0x230 net/ipv4/fib_frontend.c:905 rtnetlink_rcv_msg+0x82c/0xf00 net/core/rtnetlink.c:5688 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2512 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x78f/0x940 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1923 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2446 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2500 __sys_sendmsg net/socket.c:2529 [inline] __do_sys_sendmsg net/socket.c:2538 [inline] __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2536 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 9594: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x96e/0x1650 kernel/rcu/tree.c:2763 handle_softirqs+0x336/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3011 [inline] call_rcu+0x189/0x900 kernel/rcu/tree.c:3091 free_fib_info net/ipv4/fib_semantics.c:255 [inline] fib_info_put include/net/ip_fib.h:579 [inline] fib_release_info+0x682/0x740 net/ipv4/fib_semantics.c:281 fib_table_flush+0xc96/0x12d0 net/ipv4/fib_trie.c:2067 fib_flush net/ipv4/fib_frontend.c:194 [inline] fib_disable_ip+0xf8/0x170 net/ipv4/fib_frontend.c:1428 fib_netdev_event+0x2f2/0x480 net/ipv4/fib_frontend.c:-1 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] dev_close_many+0x29c/0x400 net/core/dev.c:1663 unregister_netdevice_many+0x4b8/0x1a40 net/core/dev.c:11136 unregister_netdevice_queue+0x2e1/0x320 net/core/dev.c:11093 unregister_netdevice include/linux/netdevice.h:3029 [inline] nsim_destroy+0x49/0x150 drivers/net/netdevsim/netdev.c:382 __nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1349 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1362 [inline] nsim_dev_reload_destroy+0x160/0x230 drivers/net/netdevsim/dev.c:1561 nsim_dev_remove+0x59/0x120 drivers/net/netdevsim/dev.c:1577 __device_release_driver drivers/base/dd.c:1247 [inline] device_release_driver_internal+0x44c/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 device_unregister+0x1c/0xc0 drivers/base/core.c:3660 nsim_bus_dev_del drivers/net/netdevsim/bus.c:454 [inline] del_device_store+0x295/0x3a0 drivers/net/netdevsim/bus.c:354 kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2173 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88814a8fd800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 24 bytes inside of 256-byte region [ffff88814a8fd800, ffff88814a8fd900) The buggy address belongs to the page: page:ffffea00052a3f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a8fc head:ffffea00052a3f00 order:1 compound_mapcount:0 flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000010200 ffffea0000ad6d00 0000000200000002 ffff888016c41b40 raw: 0000000000000000 0000000000100010 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, ts 17831092136, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node+0x142/0x3a0 mm/slub.c:4456 kmalloc_node include/linux/slab.h:630 [inline] kvmalloc_node+0x84/0x130 mm/util.c:619 kvmalloc include/linux/mm.h:816 [inline] kvzalloc include/linux/mm.h:824 [inline] v4l2_ctrl_new+0x70f/0x1310 drivers/media/v4l2-core/v4l2-ctrls-core.c:1306 v4l2_ctrl_new_std+0x247/0x300 drivers/media/v4l2-core/v4l2-ctrls-core.c:1429 handler_new_ref+0x14f/0x8d0 drivers/media/v4l2-core/v4l2-ctrls-core.c:1098 v4l2_ctrl_add_handler+0x197/0x280 drivers/media/v4l2-core/v4l2-ctrls-core.c:1573 vivid_create_controls+0x2515/0x3380 drivers/media/test-drivers/vivid/vivid-ctrls.c:1884 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1860 [inline] vivid_probe+0x39ff/0x6240 drivers/media/test-drivers/vivid/vivid-core.c:2031 platform_probe+0x137/0x1c0 drivers/base/platform.c:1391 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 page_owner free stack trace missing Memory state around the buggy address: ffff88814a8fd700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88814a8fd780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88814a8fd800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88814a8fd880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88814a8fd900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================