CVE-2025-68332

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
22/12/2025
Last modified:
22/12/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> comedi: c6xdigio: Fix invalid PNP driver unregistration<br /> <br /> The Comedi low-level driver "c6xdigio" seems to be for a parallel port<br /> connected device. When the Comedi core calls the driver&amp;#39;s Comedi<br /> "attach" handler `c6xdigio_attach()` to configure a Comedi to use this<br /> driver, it tries to enable the parallel port PNP resources by<br /> registering a PNP driver with `pnp_register_driver()`, but ignores the<br /> return value. (The `struct pnp_driver` it uses has only the `name` and<br /> `id_table` members filled in.) The driver&amp;#39;s Comedi "detach" handler<br /> `c6xdigio_detach()` unconditionally unregisters the PNP driver with<br /> `pnp_unregister_driver()`.<br /> <br /> It is possible for `c6xdigio_attach()` to return an error before it<br /> calls `pnp_register_driver()` and it is possible for the call to<br /> `pnp_register_driver()` to return an error (that is ignored). In both<br /> cases, the driver should not be calling `pnp_unregister_driver()` as it<br /> does in `c6xdigio_detach()`. (Note that `c6xdigio_detach()` will be<br /> called by the Comedi core if `c6xdigio_attach()` returns an error, or if<br /> the Comedi core decides to detach the Comedi device from the driver for<br /> some other reason.)<br /> <br /> The unconditional call to `pnp_unregister_driver()` without a previous<br /> successful call to `pnp_register_driver()` will cause<br /> `driver_unregister()` to issue a warning "Unexpected driver<br /> unregister!". This was detected by Syzbot [1].<br /> <br /> Also, the PNP driver registration and unregistration should be done at<br /> module init and exit time, respectively, not when attaching or detaching<br /> Comedi devices to the driver. (There might be more than one Comedi<br /> device being attached to the driver, although that is unlikely.)<br /> <br /> Change the driver to do the PNP driver registration at module init time,<br /> and the unregistration at module exit time. Since `c6xdigio_detach()`<br /> now only calls `comedi_legacy_detach()`, remove the function and change<br /> the Comedi driver "detach" handler to `comedi_legacy_detach`.<br /> <br /> -------------------------------------------<br /> [1] Syzbot sample crash report:<br /> Unexpected driver unregister!<br /> WARNING: CPU: 0 PID: 5970 at drivers/base/driver.c:273 driver_unregister drivers/base/driver.c:273 [inline]<br /> WARNING: CPU: 0 PID: 5970 at drivers/base/driver.c:273 driver_unregister+0x90/0xb0 drivers/base/driver.c:270<br /> Modules linked in:<br /> CPU: 0 UID: 0 PID: 5970 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)<br /> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025<br /> RIP: 0010:driver_unregister drivers/base/driver.c:273 [inline]<br /> RIP: 0010:driver_unregister+0x90/0xb0 drivers/base/driver.c:270<br /> Code: 48 89 ef e8 c2 e6 82 fc 48 89 df e8 3a 93 ff ff 5b 5d e9 c3 6d d9 fb e8 be 6d d9 fb 90 48 c7 c7 e0 f8 1f 8c e8 51 a2 97 fb 90 0b 90 90 5b 5d e9 a5 6d d9 fb e8 e0 f4 41 fc eb 94 e8 d9 f4 41<br /> RSP: 0018:ffffc9000373f9a0 EFLAGS: 00010282<br /> RAX: 0000000000000000 RBX: ffffffff8ff24720 RCX: ffffffff817b6ee8<br /> RDX: ffff88807c932480 RSI: ffffffff817b6ef5 RDI: 0000000000000001<br /> RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000<br /> R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff8ff24660<br /> R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88814cca0000<br /> FS: 000055556dab1500(0000) GS:ffff8881249d9000(0000) knlGS:0000000000000000<br /> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br /> CR2: 000055f77f285cd0 CR3: 000000007d871000 CR4: 00000000003526f0<br /> Call Trace:<br /> <br /> comedi_device_detach_locked+0x12f/0xa50 drivers/comedi/drivers.c:207<br /> comedi_device_detach+0x67/0xb0 drivers/comedi/drivers.c:215<br /> comedi_device_attach+0x43d/0x900 drivers/comedi/drivers.c:1011<br /> do_devconfig_ioctl+0x1b1/0x710 drivers/comedi/comedi_fops.c:872<br /> comedi_unlocked_ioctl+0x165d/0x2f00 drivers/comedi/comedi_fops.c:2178<br /> vfs_ioctl fs/ioctl.c:51 [inline]<br /> __do_sys_ioctl fs/ioctl.c:597 [inline]<br /> __se_sys_ioctl fs/ioctl.c:583 [inline]<br /> __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583<br /> do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]<br /> do_sys<br /> ---truncated---

Impact