# CVE-2025-40070: pps: fix warning in pps\_register\_cdev when register device fail

- Priority: **Routine**
- Reason: Not severe (CVSS 2, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-10-28 · Modified: 2026-11-10
- Aliases: UBUNTU-CVE-2025-40070, DEBIAN-CVE-2025-40070
- Record: https://cvemate.com/vulnerability/CVE-2025-40070 · JSON: https://cvemate.com/vulnerability/CVE-2025-40070/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

pps: fix warning in pps_register_cdev when register device fail

Similar to previous commit 2a934fdb01db ("media: v4l2-dev: fix error
handling in __video_register_device()"), the release hook should be set
before device_register(). Otherwise, when device_register() return error
and put_device() try to callback the release function, the below warning
may happen.

  ------------[ cut here ]------------
  WARNING: CPU: 1 PID: 4760 at drivers/base/core.c:2567 device_release+0x1bd/0x240 drivers/base/core.c:2567
  Modules linked in:
  CPU: 1 UID: 0 PID: 4760 Comm: syz.4.914 Not tainted 6.17.0-rc3+ #1 NONE
  RIP: 0010:device_release+0x1bd/0x240 drivers/base/core.c:2567
  Call Trace:
   <TASK>
   kobject_cleanup+0x136/0x410 lib/kobject.c:689
   kobject_release lib/kobject.c:720 [inline]
   kref_put include/linux/kref.h:65 [inline]
   kobject_put+0xe9/0x130 lib/kobject.c:737
   put_device+0x24/0x30 drivers/base/core.c:3797
   pps_register_cdev+0x2da/0x370 drivers/pps/pps.c:402
   pps_register_source+0x2f6/0x480 drivers/pps/kapi.c:108
   pps_tty_open+0x190/0x310 drivers/pps/clients/pps-ldisc.c:57
   tty_ldisc_open+0xa7/0x120 drivers/tty/tty_ldisc.c:432
   tty_set_ldisc+0x333/0x780 drivers/tty/tty_ldisc.c:563
   tiocsetd drivers/tty/tty_io.c:2429 [inline]
   tty_ioctl+0x5d1/0x1700 drivers/tty/tty_io.c:2728
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:598 [inline]
   __se_sys_ioctl fs/ioctl.c:584 [inline]
   __x64_sys_ioctl+0x194/0x210 fs/ioctl.c:584
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0x5f/0x2a0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
   </TASK>

Before commit c79a39dc8d06 ("pps: Fix a use-after-free"),
pps_register_cdev() call device_create() to create pps->dev, which will
init dev->release to device_create_release(). Now the comment is outdated,
just remove it.

Thanks for the reminder from Calvin Owens, 'kfree_pps' should be removed
in pps_register_source() to avoid a double free in the failure case.
```

## Signals

- CVSS: 2 low (v4.0, OSV · Ubuntu) CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- EPSS: 0.241%, percentile 16.24%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 152)

- debian linux (Debian): \< 6.1.158-1 \| \< 6.12.57-1 \| \< 6.17.6-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-170.180 \| \< 6.8.0-106.106 \| \< 6.17.0-14.14
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1100.107 \| \< 6.8.0-1050.53 \| \< 6.17.0-1007.7
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1100.107~20.04.2
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): \< 6.17.0-1007.7~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1050.53~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1100.107+fips1 \| \< 6.8.0-1050.53+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1109.118 \| \< 6.8.0-1051.57 \| \< 6.17.0-1008.8
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 43)

- <https://git.kernel.org/stable/c/38c7bb10aae5118dd48fa7a82f7bf93839bcc320>
- <https://git.kernel.org/stable/c/2a194707ca27a3b0523023fa8b446e5ec922dc51>
- <https://git.kernel.org/stable/c/125527db41805693208ee1aacd7f3ffe6a3a489c>
- <https://git.kernel.org/stable/c/4cbd7450a22c5ee4842fc4175ad06c0c82ea53a8>
- <https://git.kernel.org/stable/c/cf71834a0cfc394c72d62fd6dbb470ee13cf8f5e>
- <https://git.kernel.org/stable/c/f01fa3588e0b3cb1540f56d2c6bd99e5b3810234>
- <https://git.kernel.org/stable/c/0f97564a1fb62f34b3b498e2f12caffbe99c004a>
- <https://git.kernel.org/stable/c/b0531cdba5029f897da5156815e3bdafe1e9b88d>
- <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- <https://ubuntu.com/security/CVE-2025-40070>
- <https://www.cve.org/CVERecord?id=CVE-2025-40070>
- <https://git.kernel.org/linus/b0531cdba5029f897da5156815e3bdafe1e9b88d>
- <https://ubuntu.com/security/notices/USN-8029-1>
- <https://ubuntu.com/security/notices/USN-8030-1>
- <https://ubuntu.com/security/notices/USN-8033-1>
- <https://ubuntu.com/security/notices/USN-8033-2>
- <https://ubuntu.com/security/notices/USN-8033-3>
- <https://ubuntu.com/security/notices/USN-8034-1>
- <https://ubuntu.com/security/notices/USN-8033-4>
- <https://ubuntu.com/security/notices/USN-8029-2>

---

Data as of 2026-12-05T03:59:50.768Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
