Date
June 20, 2025, 12:38 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 180.007397] ================================================================== [ 180.007948] BUG: KASAN: slab-use-after-free in drm_encoder_cleanup+0x265/0x270 [ 180.008555] Read of size 8 at addr ffff88810769ac70 by task kunit_try_catch/1610 [ 180.009120] [ 180.009285] CPU: 0 UID: 0 PID: 1610 Comm: kunit_try_catch Tainted: G B D W N 6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) [ 180.009384] Tainted: [B]=BAD_PAGE, [D]=DIE, [W]=WARN, [N]=TEST [ 180.010184] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 180.010232] Call Trace: [ 180.010253] <TASK> [ 180.010285] dump_stack_lvl+0x73/0xb0 [ 180.010337] print_report+0xd1/0x650 [ 180.010366] ? __virt_addr_valid+0x1db/0x2d0 [ 180.010392] ? drm_encoder_cleanup+0x265/0x270 [ 180.010444] ? kasan_complete_mode_report_info+0x64/0x200 [ 180.010473] ? drm_encoder_cleanup+0x265/0x270 [ 180.010498] kasan_report+0x141/0x180 [ 180.010522] ? drm_encoder_cleanup+0x265/0x270 [ 180.010551] __asan_report_load8_noabort+0x18/0x20 [ 180.010576] drm_encoder_cleanup+0x265/0x270 [ 180.010602] drmm_encoder_alloc_release+0x36/0x60 [ 180.010627] drm_managed_release+0x15c/0x470 [ 180.010652] ? simple_release_fs+0x86/0xb0 [ 180.010680] drm_dev_put.part.0+0xa1/0x100 [ 180.010706] ? __pfx_devm_drm_dev_init_release+0x10/0x10 [ 180.010731] devm_drm_dev_init_release+0x17/0x30 [ 180.010756] devm_action_release+0x50/0x80 [ 180.010784] devres_release_all+0x186/0x240 [ 180.010809] ? __pfx_devres_release_all+0x10/0x10 [ 180.010833] ? kernfs_remove_by_name_ns+0x166/0x1d0 [ 180.010861] ? sysfs_remove_file_ns+0x56/0xa0 [ 180.010887] device_unbind_cleanup+0x1b/0x1b0 [ 180.010911] device_release_driver_internal+0x3e4/0x540 [ 180.010935] ? klist_devices_put+0x35/0x50 [ 180.010958] device_release_driver+0x16/0x20 [ 180.010981] bus_remove_device+0x1e9/0x3d0 [ 180.011005] device_del+0x397/0x980 [ 180.011031] ? __pfx_device_del+0x10/0x10 [ 180.011053] ? __kasan_check_write+0x18/0x20 [ 180.011077] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 180.011101] ? __pfx_device_unregister_wrapper+0x10/0x10 [ 180.011144] device_unregister+0x1b/0xa0 [ 180.011169] device_unregister_wrapper+0x12/0x20 [ 180.011191] __kunit_action_free+0x57/0x70 [ 180.011215] kunit_remove_resource+0x133/0x200 [ 180.011239] ? preempt_count_sub+0x50/0x80 [ 180.011265] kunit_cleanup+0x7a/0x120 [ 180.011291] kunit_try_run_case_cleanup+0xbd/0xf0 [ 180.011315] ? __pfx_kunit_try_run_case_cleanup+0x10/0x10 [ 180.011340] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 180.011362] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 180.011384] kthread+0x337/0x6f0 [ 180.011417] ? trace_preempt_on+0x20/0xc0 [ 180.011449] ? __pfx_kthread+0x10/0x10 [ 180.011472] ? _raw_spin_unlock_irq+0x47/0x80 [ 180.011494] ? calculate_sigpending+0x7b/0xa0 [ 180.011520] ? __pfx_kthread+0x10/0x10 [ 180.011543] ret_from_fork+0x116/0x1d0 [ 180.011565] ? __pfx_kthread+0x10/0x10 [ 180.011588] ret_from_fork_asm+0x1a/0x30 [ 180.011622] </TASK> [ 180.011638] [ 180.025925] Allocated by task 1609: [ 180.026359] kasan_save_stack+0x45/0x70 [ 180.026674] kasan_save_track+0x18/0x40 [ 180.026859] kasan_save_alloc_info+0x3b/0x50 [ 180.027295] __kasan_kmalloc+0xb7/0xc0 [ 180.027630] __kmalloc_noprof+0x1c9/0x500 [ 180.027967] __devm_drm_bridge_alloc+0x33/0x170 [ 180.028248] drm_test_bridge_init+0x188/0x5c0 [ 180.028456] drm_test_drm_bridge_get_current_state_atomic+0xea/0x870 [ 180.028695] kunit_try_run_case+0x1a5/0x480 [ 180.028891] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 180.029136] kthread+0x337/0x6f0 [ 180.029305] ret_from_fork+0x116/0x1d0 [ 180.029624] ret_from_fork_asm+0x1a/0x30 [ 180.030050] [ 180.030324] Freed by task 1610: [ 180.030618] kasan_save_stack+0x45/0x70 [ 180.030947] kasan_save_track+0x18/0x40 [ 180.031342] kasan_save_free_info+0x3f/0x60 [ 180.031752] __kasan_slab_free+0x56/0x70 [ 180.032147] kfree+0x222/0x3f0 [ 180.032463] drm_bridge_put.part.0+0xc7/0x100 [ 180.032828] drm_bridge_put_void+0x17/0x30 [ 180.033267] devm_action_release+0x50/0x80 [ 180.033503] devres_release_all+0x186/0x240 [ 180.033896] device_unbind_cleanup+0x1b/0x1b0 [ 180.034341] device_release_driver_internal+0x3e4/0x540 [ 180.034736] device_release_driver+0x16/0x20 [ 180.035034] bus_remove_device+0x1e9/0x3d0 [ 180.035417] device_del+0x397/0x980 [ 180.035685] device_unregister+0x1b/0xa0 [ 180.036039] device_unregister_wrapper+0x12/0x20 [ 180.036396] __kunit_action_free+0x57/0x70 [ 180.036741] kunit_remove_resource+0x133/0x200 [ 180.037134] kunit_cleanup+0x7a/0x120 [ 180.037512] kunit_try_run_case_cleanup+0xbd/0xf0 [ 180.037827] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 180.038318] kthread+0x337/0x6f0 [ 180.038550] ret_from_fork+0x116/0x1d0 [ 180.038730] ret_from_fork_asm+0x1a/0x30 [ 180.038919] [ 180.039027] The buggy address belongs to the object at ffff88810769ac00 [ 180.039027] which belongs to the cache kmalloc-512 of size 512 [ 180.039447] The buggy address is located 112 bytes inside of [ 180.039447] freed 512-byte region [ffff88810769ac00, ffff88810769ae00) [ 180.040385] [ 180.040584] The buggy address belongs to the physical page: [ 180.041010] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107698 [ 180.041792] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 180.042454] flags: 0x200000000000040(head|node=0|zone=2) [ 180.042945] page_type: f5(slab) [ 180.043260] raw: 0200000000000040 ffff888100041c80 dead000000000122 0000000000000000 [ 180.044180] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 180.044626] head: 0200000000000040 ffff888100041c80 dead000000000122 0000000000000000 [ 180.045208] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 180.045677] head: 0200000000000002 ffffea00041da601 00000000ffffffff 00000000ffffffff [ 180.046131] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 [ 180.047692] page dumped because: kasan: bad access detected [ 180.048220] [ 180.048402] Memory state around the buggy address: [ 180.048820] ffff88810769ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 180.049489] ffff88810769ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 180.049937] >ffff88810769ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 180.050213] ^ [ 180.050464] ffff88810769ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 180.050942] ffff88810769ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 180.051379] ==================================================================