🔍 CVE-2025-40070

0.0
CVSS Score
UNKNOWN
2025-10-28
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 pps 모듈에서 장치 등록 실패 시 release 훅이 적절히 설정되지 않아 발생하는 경고 및 오류 문제입니다. 장치 등록 과정에서 오류가 발생할 경우, 해제 함수가 설정되기 전에 장치 해제를 시도하여 커널 경고나 메모리 관련 문제가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터 부품을 등록하다가 실패했을 때, 뒷정리를 하는 방법이 미리 정해져 있지 않아 시스템이 당황하며 경고를 내보내는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 오류가 발생할 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

Linux Kernel (pps 모듈을 사용하는 버전)

⚔️ 공격 벡터

로컬 권한을 가진 사용자가 특수하게 조작된 ioctl 호출을 통해 장치 등록 실패를 유도하여 발생 가능

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel