================================================================== BUG: KASAN: slab-use-after-free in dvb_device_open+0x36a/0x3b0 drivers/media/dvb-core/dvbdev.c:99 Read of size 8 at addr ffff8881462a7c18 by task syz.0.5494/29988 CPU: 0 UID: 0 PID: 29988 Comm: syz.0.5494 Tainted: G U W L XTNJ syzkaller #0 PREEMPT(full) Tainted: [U]=USER, [W]=WARN, [L]=SOFTLOCKUP, [X]=AUX, [T]=RANDSTRUCT, [N]=TEST, [J]=FWCTL Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 dvb_device_open+0x36a/0x3b0 drivers/media/dvb-core/dvbdev.c:99 chrdev_open+0x234/0x6a0 fs/char_dev.c:414 do_dentry_open+0x982/0x1530 fs/open.c:965 vfs_open+0x82/0x3f0 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x1de4/0x2cb0 fs/namei.c:4134 do_filp_open+0x20b/0x470 fs/namei.c:4161 do_sys_openat2+0x11b/0x1d0 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] __x64_sys_openat+0x174/0x210 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f13e4d8efc9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f13e5bf3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f13e4fe5fa0 RCX: 00007f13e4d8efc9 RDX: 0000000000000000 RSI: 0000200000000000 RDI: ffffffffffffff9c RBP: 00007f13e4e11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f13e4fe6038 R14: 00007f13e4fe5fa0 R15: 00007ffc0588a6f8 Allocated by task 29653: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5634 [inline] __kmalloc_noprof+0x32f/0x880 mm/slub.c:5646 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] fib_create_info+0x53f/0x46b0 net/ipv4/fib_semantics.c:1402 fib_table_insert+0x177/0x1c40 net/ipv4/fib_trie.c:1212 fib_magic+0x4d4/0x5c0 net/ipv4/fib_frontend.c:1134 fib_add_ifaddr+0x16d/0x580 net/ipv4/fib_frontend.c:1156 fib_netdev_event+0x38a/0x710 net/ipv4/fib_frontend.c:1516 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9676 netif_change_flags+0x108/0x160 net/core/dev.c:9705 do_setlink.constprop.0+0xb53/0x4380 net/core/rtnetlink.c:3151 rtnl_changelink net/core/rtnetlink.c:3769 [inline] __rtnl_newlink net/core/rtnetlink.c:3928 [inline] rtnl_newlink+0x1446/0x2000 net/core/rtnetlink.c:4065 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6951 netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] __sys_sendto+0x4a3/0x520 net/socket.c:2244 __do_sys_sendto net/socket.c:2251 [inline] __se_sys_sendto net/socket.c:2247 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2247 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 8130: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 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+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2530 [inline] slab_free mm/slub.c:6619 [inline] kfree+0x2b8/0x6d0 mm/slub.c:6826 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622 do_softirq kernel/softirq.c:523 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:510 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:450 spin_unlock_bh include/linux/spinlock.h:396 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:835 [inline] nsim_dev_trap_report_work+0x8b5/0xcf0 drivers/net/netdevsim/dev.c:866 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:559 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123 call_rcu_hurry include/linux/rcupdate.h:115 [inline] free_fib_info net/ipv4/fib_semantics.c:246 [inline] fib_create_info+0x1a8f/0x46b0 net/ipv4/fib_semantics.c:1536 fib_table_insert+0x177/0x1c40 net/ipv4/fib_trie.c:1212 fib_magic+0x4d4/0x5c0 net/ipv4/fib_frontend.c:1134 fib_add_ifaddr+0x16d/0x580 net/ipv4/fib_frontend.c:1156 fib_netdev_event+0x38a/0x710 net/ipv4/fib_frontend.c:1516 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9676 netif_change_flags+0x108/0x160 net/core/dev.c:9705 do_setlink.constprop.0+0xb53/0x4380 net/core/rtnetlink.c:3151 rtnl_changelink net/core/rtnetlink.c:3769 [inline] __rtnl_newlink net/core/rtnetlink.c:3928 [inline] rtnl_newlink+0x1446/0x2000 net/core/rtnetlink.c:4065 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6951 netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] __sys_sendto+0x4a3/0x520 net/socket.c:2244 __do_sys_sendto net/socket.c:2251 [inline] __se_sys_sendto net/socket.c:2247 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2247 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8881462a7c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 24 bytes inside of freed 256-byte region [ffff8881462a7c00, ffff8881462a7d00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1462a6 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 057ff00000000040 ffff88813ffa6b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 057ff00000000040 ffff88813ffa6b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 057ff00000000001 ffffea000518a981 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 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 25986245492, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3046 [inline] allocate_slab mm/slub.c:3219 [inline] new_slab+0x24a/0x360 mm/slub.c:3273 ___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4643 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4762 __slab_alloc_node mm/slub.c:4838 [inline] slab_alloc_node mm/slub.c:5260 [inline] __kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5750 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] bus_add_driver+0x92/0x690 drivers/base/bus.c:662 driver_register+0x15c/0x4b0 drivers/base/driver.c:249 usb_register_driver+0x216/0x4d0 drivers/usb/core/driver.c:1078 do_one_initcall+0x123/0x6e0 init/main.c:1283 do_initcall_level init/main.c:1345 [inline] do_initcalls init/main.c:1361 [inline] do_basic_setup init/main.c:1380 [inline] kernel_init_freeable+0x5c8/0x920 init/main.c:1593 kernel_init+0x1c/0x2b0 init/main.c:1483 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page_owner free stack trace missing Memory state around the buggy address: ffff8881462a7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881462a7b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881462a7c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881462a7c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881462a7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================