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 74C352FD1CA for ; Mon, 15 Sep 2025 14:25:44 +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=1757946344; cv=none; b=H6jt9CGajbmNArbYd0DFZpfNdLJFZACtFoyO0M/25KqBBgj/iHIB3okzRWrfZ5Y7mCOJWOXlor7PjDhvgTzfjp20gVZHCH06GR9d28gtzcEPZ1sKRM6Hz1rTjiOm6ao815WRQ1HhZQTMii0wCjGTFvJFztx2KJVfxAlFLoOxrts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946344; c=relaxed/simple; bh=hMyX1T6tanSoimBMPzDsYRaadWnOqHw5J3uy/ozRaIY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=e9k5j7xvncIo7lKuyNHfBKRB6nNcH5M5pWKtPf4vPJLTsIAHaGhoh9prkfToizPT5b6bSMAPyKOk0F+kXhvCrmzYbHPljUD3ecaTN4SYTEVz0ToEQovkvXydsVIX1Cc8cWG40JhWD0sHiPgTJK9HUk0HXTgevIj7rMvOmIMkg1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SkNSYIg1; 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="SkNSYIg1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77FAC4CEF5; Mon, 15 Sep 2025 14:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946344; bh=hMyX1T6tanSoimBMPzDsYRaadWnOqHw5J3uy/ozRaIY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SkNSYIg1C2h1KsW54HJxWfyZmaecmzNiEiGNp3qet/pLY9aYBU+jKduik0rxkajdz RL7aSApNetwlpVMUZ2WOE8rX7oRUXbWddbaJCy5zZLaI8SJ7c6V3JhfujV084Z44UQ PfJLZ/Su7r8tvx0fpn5BU8boJS5E35OOsuMJpgiM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53227: ubifs: dirty_cow_znode: Fix memleak in error handling path Date: Mon, 15 Sep 2025 16:22:01 +0200 Message-ID: <2025091514-CVE-2023-53227-6a15@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3532; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ogbjtLnkMGE+G93lak8+Ok5+EPDfpZ6baNgr7TaZGec=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFG4d/r3h7r8tdWJdB+WX9Sz34Hn4Kf3fD2cvwa71B 4+5h3vrdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEpp9gWNC/eOKhxw39l7Pa r9VH/Tuy4MieWAmGBRur+89c8eN0uyAYtimK4XDGu8CkIgA= 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: ubifs: dirty_cow_znode: Fix memleak in error handling path Following process will cause a memleak for copied up znode: dirty_cow_znode zn = copy_znode(c, znode); err = insert_old_idx(c, zbr->lnum, zbr->offs); if (unlikely(err)) return ERR_PTR(err); // No one refers to zn. Fix it by adding copied znode back to tnc, then it will be freed by ubifs_destroy_tnc_subtree() while closing tnc. Fetch a reproducer in [Link]. The Linux kernel CVE team has assigned CVE-2023-53227 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 4.14.308 with commit 011050fc471cd0b32410694facb47bac20e7262b Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 4.19.276 with commit 5759076fc7c54614084002345a21bc2c578bf4a8 Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.4.235 with commit 510b80abe8d2d89e4ff21d71f1804ba2e5d3a96b Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.10.173 with commit 9d4768523b092bfb9a9bfa6b1d903b968c8008cf Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.15.100 with commit 10b6c359e374df1120b951768260083ef047d7fb Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.1.18 with commit 76c488e8a0e2783c6d8753cb7354a420593e8c30 Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.2.5 with commit bbcf899036eeb98c3a938fb08946c6b52771f71c Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.3 with commit 122deabfe1428bffe95e2bf364ff8a5059bdf089 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-2023-53227 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: fs/ubifs/tnc.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/011050fc471cd0b32410694facb47bac20e7262b https://git.kernel.org/stable/c/5759076fc7c54614084002345a21bc2c578bf4a8 https://git.kernel.org/stable/c/510b80abe8d2d89e4ff21d71f1804ba2e5d3a96b https://git.kernel.org/stable/c/9d4768523b092bfb9a9bfa6b1d903b968c8008cf https://git.kernel.org/stable/c/10b6c359e374df1120b951768260083ef047d7fb https://git.kernel.org/stable/c/76c488e8a0e2783c6d8753cb7354a420593e8c30 https://git.kernel.org/stable/c/bbcf899036eeb98c3a938fb08946c6b52771f71c https://git.kernel.org/stable/c/122deabfe1428bffe95e2bf364ff8a5059bdf089