Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5BB486337 for ; Sat, 14 Feb 2026 15:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771082562; cv=none; b=lLW0eCUUxrBv7DTBsShbSV6IWA1ujAdBlcJSG4SdioAFNOAgJEudmrHWoo/wzemplDOkPGXBWzTueT4UOvAhRDq1PMSNP8il4Bm/dhH4092pCrfxwgTM0ZDMTbJJqgkOI4Vun3Y5omVZ/kg1JAxD3cmn3fzZtcfhPrt58eF247A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771082562; c=relaxed/simple; bh=bykp8B4nBZu0E+fqnF7qvUoqLj9ML3gVpJBVIn8RqQo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Kv37c1oQs6aglZGZwSdrrfTlJqaq/2kX91hhKI/VtsBg7GnNr0UZysl6EzdUWfuXIqZjD8bMPQ70x6TsSzgJiVVdtjwgSokpwXNyu1hPMB9mqAEBqvwXTqrngAqFYT65IxBSJu/AZh4O6TtXeSjfrHTN7iIbh3X5tQaDxB8lPuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p1GDDyMw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="p1GDDyMw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 312EAC16AAE; Sat, 14 Feb 2026 15:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771082561; bh=bykp8B4nBZu0E+fqnF7qvUoqLj9ML3gVpJBVIn8RqQo=; h=From:To:Cc:Subject:Date:Reply-To:From; b=p1GDDyMwp+a24vV7mX0rWkJgrzfSiS54uOffMMDbMR0ek0gEQW7lBWzLHteH+pVqs iAhQrcC2273eJaSVL2Mi+krihbpLQOOM3B2CTyji96yGH0ohwv1EvLHQJlHoiwjWZu 5XqGzl25BJ7jnjZilfeGgFB0tzDK3PJ4BO7fjbcM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23137: of: unittest: Fix memory leak in unittest_data_add() Date: Sat, 14 Feb 2026 16:22:31 +0100 Message-ID: <2026021429-CVE-2026-23137-b77f@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2204; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fx79D2U/MmBkY7NJG4jG/wD2c03XT4TsrbvqIk5LNaE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkTJpvObm1lbjmVbrzzc6iG1CPhpttVNc/ly9Kbb+9XY ppw2OhrRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE3o1hwcTfuwzneN0+7nRa qWyHh/IRqfyQEwzzk9b29/huP6e4PF2x6ezVzOLc7tc1AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: of: unittest: Fix memory leak in unittest_data_add() In unittest_data_add(), if of_resolve_phandles() fails, the allocated unittest_data is not freed, leading to a memory leak. Fix this by using scope-based cleanup helper __free(kfree) for automatic resource cleanup. This ensures unittest_data is automatically freed when it goes out of scope in error paths. For the success path, use retain_and_null_ptr() to transfer ownership of the memory to the device tree and prevent double freeing. The Linux kernel CVE team has assigned CVE-2026-23137 to this issue. Affected and fixed versions =========================== Issue introduced in 3.18 with commit 2eb46da2a760e5764c48b752a5ef320e02b96b21 and fixed in 6.18.6 with commit f09b0f705bd7197863b90256ef533a6414d1db2c Issue introduced in 3.18 with commit 2eb46da2a760e5764c48b752a5ef320e02b96b21 and fixed in 6.19 with commit 235a1eb8d2dcc49a6cf0a5ee1aa85544a5d0054b Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-23137 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/of/unittest.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f09b0f705bd7197863b90256ef533a6414d1db2c https://git.kernel.org/stable/c/235a1eb8d2dcc49a6cf0a5ee1aa85544a5d0054b