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 6FB922E36F4 for ; Wed, 1 Oct 2025 11:53:23 +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=1759319603; cv=none; b=X7K9LEzR6fbwX3viUwqegm1jVGFswydEiU+c0Nh60takmwIzQhbac2DPFscsW6XAPbk5QwNa7hBrLxJbNi7CqGqgl5VHxxofI8RZPlBhD5BcK2jXdM9+gbWo1xRgZKuMna/TgB/DkhZhYZzqoD2ZVkfJJHqv6setL4nPcHxQeqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319603; c=relaxed/simple; bh=qeT5rO5lhUos4a+Dxrfl0PkodhM8J5RQzYh67SrvvFQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pGjLAeUTEatAH+gE5NKJxUdlYuYkp41MGMihOHTF7IcMvIqDkHdRTn1WlXcGVPDIFaece1r1RqjUOKn8D8NK9BOB2yVYbNUqQAOvD+1IBtgMReOOH+vrYPPknPjZe/8VGmorZrl0bv3Q8u+BLZN1/QO6+nTt2CNrWuypeAlVhdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h9GP8lwV; 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="h9GP8lwV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A86BC4CEF4; Wed, 1 Oct 2025 11:53:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319603; bh=qeT5rO5lhUos4a+Dxrfl0PkodhM8J5RQzYh67SrvvFQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=h9GP8lwVmoBk6FaZvpsICYJ7WV1THUWgTKWWGijgwbRO+lJaEEwf3BjHLIejLKCZh JNl+05L9YsTbhLYHamBBAZUWzug4mjXMRQvMTuR1OWr/mZR6ysfxvneJrSHuBdZUoj QryoUUQji2rpRNXXok5CViJWLDnHCeKv2cS/GGD8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53468: ubifs: Fix memory leak in alloc_wbufs() Date: Wed, 1 Oct 2025 13:42:38 +0200 Message-ID: <2025100109-CVE-2023-53468-8dea@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=4652; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wXvL6ywuRzjHNqQQFazLN4rZqYxeb5jluzTi3tfcpAY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3hSc6+U2f5LejIvGEkv1GAwNrB7EKt+AilclKbAKX8 1wOrLvaEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNR82WY71sduvJyQcCjXr0I bs3altaaTzfTGBbsuellPjFgbujpBzUiMY8fWggL974AAA== 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: Fix memory leak in alloc_wbufs() kmemleak reported a sequence of memory leaks, and show them as following: unreferenced object 0xffff8881575f8400 (size 1024): comm "mount", pid 19625, jiffies 4297119604 (age 20.383s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmalloc+0x4d/0x150 [] ubifs_mount+0x307b/0x7170 [ubifs] [] legacy_get_tree+0xed/0x1d0 [] vfs_get_tree+0x7d/0x230 [] path_mount+0xdd4/0x17b0 [] __x64_sys_mount+0x1fa/0x270 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff8881798a6e00 (size 512): comm "mount", pid 19677, jiffies 4297121912 (age 37.816s) hex dump (first 32 bytes): 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk backtrace: [] __kmalloc+0x4d/0x150 [] ubifs_wbuf_init+0x52/0x480 [ubifs] [] ubifs_mount+0x31f5/0x7170 [ubifs] [] legacy_get_tree+0xed/0x1d0 [] vfs_get_tree+0x7d/0x230 [] path_mount+0xdd4/0x17b0 [] __x64_sys_mount+0x1fa/0x270 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 The problem is that the ubifs_wbuf_init() returns an error in the loop which in the alloc_wbufs(), then the wbuf->buf and wbuf->inodes that were successfully alloced before are not freed. Fix it by adding error hanging path in alloc_wbufs() which frees the memory alloced before when ubifs_wbuf_init() returns an error. The Linux kernel CVE team has assigned CVE-2023-53468 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.4.235 with commit 1f206002c6bc302bface871ef3f72c0bbcaa931c Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.10.173 with commit bf50229494f0443b3f08427d7df63e5a7e2a796a Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 5.15.100 with commit 3e29634eb56e6547272fe4e568f63421f8b3b9fa Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.1.18 with commit 26ec45f1c504e15268383019df139d7983f1e67f Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.2.5 with commit e11f36d3bc4d23f620754a948fe7b82b63dcb185 Issue introduced in 2.6.27 with commit 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d and fixed in 6.3 with commit 4a1ff3c5d04b9079b4f768d9a71b51c4af578dd2 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-53468 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/super.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/1f206002c6bc302bface871ef3f72c0bbcaa931c https://git.kernel.org/stable/c/bf50229494f0443b3f08427d7df63e5a7e2a796a https://git.kernel.org/stable/c/3e29634eb56e6547272fe4e568f63421f8b3b9fa https://git.kernel.org/stable/c/26ec45f1c504e15268383019df139d7983f1e67f https://git.kernel.org/stable/c/e11f36d3bc4d23f620754a948fe7b82b63dcb185 https://git.kernel.org/stable/c/4a1ff3c5d04b9079b4f768d9a71b51c4af578dd2