🔍 CVE-2025-38682

7.8
CVSS Score
HIGH
2025-09-04
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 i2c 코어에서 i2c_unregister_device() 함수 호출 시 fwnode가 중복 해제되는 취약점이 발견되었습니다. 소프트웨어 노드를 사용하는 경우 fwnode_handle_put()과 device_remove_software_node()가 동시에 호출되어 참조 횟수 언더플로우 및 Use-After-Free 오류를 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터 부품을 관리하는 소프트웨어가 이미 삭제된 메모리 주소를 다시 삭제하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: i2c: core: Fix double-free of fwnode in i2c_unregister_device() Before commit df6d7277e552 ("i2c: core: Do not dereference fwnode in struct device"), i2c_unregister_device() only called fwnode_handle_put() on of_node-s in the form of calling of_node_put(client->dev.of_node). But after this commit the i2c_client's fwnode now unconditionally gets fwnode_handle_put() on it. When the i2c_client has no primary (ACPI / OF) fwnode but it does have a software fwnode, the software-node will be the primary node and fwnode_handle_put() will put() it. But for the software fwnode device_remove_software_node() will also put() it leading to a double free: [ 82.665598] ------------[ cut here ]------------ [ 82.665609] refcount_t: underflow; use-after-free. [ 82.665808] WARNING: CPU: 3 PID: 1502 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x11 ... [ 82.666830] RIP: 0010:refcount_warn_saturate+0xba/0x110 ... [ 82.666962] <TASK> [ 82.666971] i2c_unregister_device+0x60/0x90 Fix this by not calling fwnode_handle_put() when the primary fwnode is a software-node.

📍 영향받는 시스템

Linux Kernel (i2c core 관련 모듈을 사용하는 시스템)

⚔️ 공격 벡터

로컬 공격자가 특정 I2C 장치 제거 시나리오를 유도하여 메모리 오류를 발생시킴

🛡️ 대응 방법

Linux 커널을 최신 패치 버전(commit df6d7277e552 포함 버전)으로 업데이트하십시오.

🔧 검증 코드

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

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel