UBUNTU-CVE-2026-23137: Double Free
In the Linux kernel, the following vulnerability has been resolved: of: unittest: Fix memory leak in unittestdataadd() In unittestdataadd(), if ofresolvephandles() fails, the allocated unittestdata is not freed, leading to a memory leak. Fix this by using scope-based cleanup helper free(kfree) for automatic resource cleanup. This ensures unittestdata is automatically freed when it goes out of scope in error paths. For the success path, use retainandnullptr() to transfer ownership of the memory to the device tree and prevent double freeing.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-azure-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1021.21~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fde-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1018.18~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1021.24~24.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-41.41~24.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1031.31 - Upgrade
Upgrade
ubuntu/linux-oem-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1030.30 - Upgrade
Upgrade
ubuntu/linux-oracle-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1019.19~24.04.3 - Upgrade
Upgrade
ubuntu/linux-realtime-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1018.20~24.04.1 - Compensating control
Use the scope-based cleanup helper __free(kfree) for unittest_data so it is automatically freed on error paths when of_resolve_phandles() fails.
- Compensating control
On the success path, use retain_and_null_ptr() to transfer ownership of the memory to the device tree and prevent double freeing.