{"id":"CVE-2026-23137","aliases":["CVE-2026-23137"],"related":[],"kind":"vulnerability","state":"published","title":"of: unittest: Fix memory leak in unittest_data_add()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nof: unittest: Fix memory leak in unittest_data_add()\n\nIn unittest_data_add(), if of_resolve_phandles() fails, the allocated\nunittest_data is not freed, leading to a memory leak.\n\nFix this by using scope-based cleanup helper __free(kfree) for automatic\nresource cleanup. This ensures unittest_data is automatically freed when\nit goes out of scope in error paths.\n\nFor the success path, use retain_and_null_ptr() to transfer ownership\nof the memory to the device tree and prevent double freeing.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nof: unittest: Fix memory leak in unittest_data_add()\n\nIn unittest_data_add(), if of_resolve_phandles() fails, the allocated\nunittest_data is not freed, leading to a memory leak.\n\nFix this by using scope-based cleanup helper __free(kfree) for automatic\nresource cleanup. This ensures unittest_data is automatically freed when\nit goes out of scope in error paths.\n\nFor the success path, use retain_and_null_ptr() to transfer ownership\nof the memory to the device tree and prevent double freeing.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nof: unittest: Corrección de fuga de memoria en unittest_data_add()\n\nEn unittest_data_add(), si of_resolve_phandles() falla, el unittest_data asignado no se libera, lo que provoca una fuga de memoria.\n\nEsto se soluciona usando un ayudante de limpieza basado en el ámbito __free(kfree) para la limpieza automática de recursos. Esto asegura que unittest_data se libera automáticamente cuando sale del ámbito en rutas de error.\n\nPara la ruta de éxito, use retain_and_null_ptr() para transferir la propiedad de la memoria al árbol de dispositivos y evitar la doble liberación.","source":"nvd"}],"published":"2026-02-14T15:22:22.690Z","modified":"2026-10-30T13:18:33.770Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"2eb46da2a760e5764c48b752a5ef320e02b96b21","fixed":"4bafaec9e3a784d103ab9da11095708fcca70e76","status":"affected"},{"type":"git","introduced":"2eb46da2a760e5764c48b752a5ef320e02b96b21","fixed":"4c7ad40c285ab85e3614433e063f14aac2e2fe17","status":"affected"},{"type":"git","introduced":"2eb46da2a760e5764c48b752a5ef320e02b96b21","fixed":"58baf98d1bdab897fd796f39a16061bade229d71","status":"affected"},{"type":"git","introduced":"2eb46da2a760e5764c48b752a5ef320e02b96b21","fixed":"f09b0f705bd7197863b90256ef533a6414d1db2c","status":"affected"},{"type":"git","introduced":"2eb46da2a760e5764c48b752a5ef320e02b96b21","fixed":"235a1eb8d2dcc49a6cf0a5ee1aa85544a5d0054b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.18","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.110","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.6","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.18","fixed":"6.18.6"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/4bafaec9e3a784d103ab9da11095708fcca70e76","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4c7ad40c285ab85e3614433e063f14aac2e2fe17","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/58baf98d1bdab897fd796f39a16061bade229d71","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f09b0f705bd7197863b90256ef533a6414d1db2c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/235a1eb8d2dcc49a6cf0a5ee1aa85544a5d0054b","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23137","url":"https://www.cve.org/CVERecord?id=CVE-2026-23137","licence":"CVE Terms of Use","modified":"2026-10-30T12:23:44.164Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23137","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23137","licence":"Public domain","modified":"2026-10-30T13:18:33.770Z"}],"updatedAt":"2026-11-25T22:59:13.883Z","epss":{"score":0.00173,"percentile":0.07085,"date":"2026-12-01T12:00:22.000Z"}}