CVE-2025-38682 in Linux
요약
\~에 의해 VulDB • 2026. 07. 07.
리눅스 커널에서 다음 취약점이 해결되었습니다:
i2c: core: i2c_unregister_device()에서의 fwnode 이중 해제(double-free) 수정
커밋 df6d7277e552("i2c: core: struct device의 fwnode 역참조 금지") 이전에는, i2c_unregister_device()가 of_node_put(client->dev.of_node)를 호출하는 형태의 of_node-s에 대해서만 fwnode_handle_put()을 호출했습니다.
하지만 이 커밋 이후로 i2c_client의 fwnode는 이제 조건 없이 fwnode_handle_put()이 적용됩니다.
i2c_client가 기본(ACPI / OF) fwnode를 가지고 있지 않고 소프트웨어 fwnode만 있는 경우, software-node가 primary 노드가 되며 fwnode_handle_put()에 의해 put() 처리됩니다.
그러나 소프트웨어 fwnode의 경우 device_remove_software_node()에서도 이를 put()하므로 이중 해제(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
기본 fwnode가 software-node인 경우 fwnode_handle_put()을 호출하지 않음으로써 이 문제를 해결합니다.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.