All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [media?] INFO: trying to register non-static key in dvb_frontend_release
@ 2026-12-05 23:17 syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2026-12-05 23:17 UTC (permalink / raw)
  To: hverkuil+cisco, linux-kernel, linux-media, max, mchehab, mchehab,
	ribalda, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    007722b8211f Merge tag 'net-7.4-rc6' of git://git.kernel.o..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=131bc553580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=fc1834b4a2e3ba54
dashboard link: https://syzkaller.appspot.com/bug?extid=4520e4f1dd0df92aeaa6
compiler:       Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1672743bbf86/disk-007722b8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/be06cebda124/vmlinux-007722b8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f36d4929339f/bzImage-007722b8.xz

The issue was bisected by AI to:

commit fe35637b0a9f8837a63ec4ffc52831de2af98fe4
Author: Max Kellermann <max@duempel.org>
Date:   Mon Jul 4 12:08:51 2016 +0000

    [media] dvb_frontend: eliminate blocking wait in dvb_unregister_frontend()

reasoning:      https://syzkaller.appspot.com/ai_job?id=7ef283f7-c074-4764-8734-d89eabe49d8b

AI-generated root cause summary:
A lifecycle mismatch in the DVB core causes a use-after-free of struct
dvb_adapter (fe->dvb) in dvb_frontend_release(). When a DVB frontend device is
opened, dvb_frontend_open() takes a reference on struct dvb_frontend
(fe->refcount) and struct dvb_device, but struct dvb_adapter is not
reference-counted, and dvb_unregister_frontend() and dvb_unregister_adapter()
return immediately without waiting for open file descriptors to close. Upon
device disconnect, the driver frees the device structure embedding struct
dvb_adapter while userspace still holds the frontend fd open. When the fd is
later closed in dvb_frontend_release(), accessing fe->dvb->mdev_lock hits the
freed (and here reallocated/zeroed) adapter memory, causing KASAN to see live
heap memory while lockdep detects an uninitialized non-static lock key.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=4520e4f1dd0df92aeaa6

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+4520e4f1dd0df92aeaa6@syzkaller.appspotmail.com

The bisection result may be wrong.
If you agree with it, please also add:
Fixes: fe35637b0a9f ("[media] dvb_frontend: eliminate blocking wait in dvb_unregister_frontend()")

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 UID: 0 PID: 11557 Comm: syz.4.1377 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:1028
 register_lock_class+0xcc/0x2e0 kernel/locking/lockdep.c:1343
 __lock_acquire+0x10c/0x2de0 kernel/locking/lockdep.c:5162
 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
 __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline]
 mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580
 dvb_frontend_release+0x1c2/0x4d0 drivers/media/dvb-core/dvb_frontend.c:2942
 __fput+0x41a/0xa70 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:618
 filp_close_sync+0x6e/0xa0 fs/open.c:1574
 close_files fs/file.c:572 [inline]
 put_files_struct+0x233/0x3c0 fs/file.c:584
 do_exit+0x6f0/0x2360 kernel/exit.c:977
 do_group_exit+0x22d/0x2f0 kernel/exit.c:1123
 get_signal+0x136a/0x1430 kernel/signal.c:3113
 arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
 exit_to_user_mode_loop+0x10e/0x770 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
 do_syscall_64+0x336/0x540 arch/x86/entry/syscall_64.c:107
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4b782fa4ce
Code: Unable to access opcode bytes at 0x7f4b782fa4a4.
RSP: 002b:00007fff7964d238 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6
RAX: fffffffffffffdfc RBX: 000055557d526500 RCX: 00007f4b782fa4ce
RDX: 00007fff7964d290 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f4b785c7ea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000b2905
R13: 00007fff7964d3e0 R14: 00000000000b1d4c R15: 00007fff7964d3c0
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-05 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 23:17 [syzbot] [media?] INFO: trying to register non-static key in dvb_frontend_release syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.