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 117CA2E090A for ; Tue, 16 Sep 2025 08:12:09 +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=1758010330; cv=none; b=bnn8iMEp+tRe2ctUModY/bw84+CoYzH38cqaKj93vZqTeTXy0QPnbb/t2ox2g3RrB3rJazPODxzighsx3u57XRe0igfiK79sB1gcef3RdEvO766wez2WppOdG3hx0ro6xTWiJYQ1Basb8zrGp5k9BurapdgmCHAUboJdJb8hs78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758010330; c=relaxed/simple; bh=0r/i9vDLz0CQqLDPM9/wDxfyJRi409u4eQRRtJdJNhc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ejz98kxyf5Rb//6Cqmas0ayndh5tEnwtWDBTPfiOjG6bA6xnoaAlZO3ybbB/cF1U2lMX8bCqNiz5XUC6rsgvHKu97MGErPia3sQb1cFI5UihJMhY8QHbeYhXgFT9sKUeZH1DidE2/fWERHEm18e19ty/VOCmsAa/ec8GWKTzIBo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EAe8xDOo; 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="EAe8xDOo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A6C8C4CEFC; Tue, 16 Sep 2025 08:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758010329; bh=0r/i9vDLz0CQqLDPM9/wDxfyJRi409u4eQRRtJdJNhc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EAe8xDOodpvTrHLs3NWy+jWu67/qpx/xiVF5ktbBveW9oVzGT5VVgsmBzrDud1M+I ZNtT6KHJ3RqP0vSKAiUYa0Osht1B1ZfNgEpxfJMvulr9HIEWVVV94Wnesux339Y9oY gLxifxxtl9FOjoZZzDIMOSLvnoeSX0OG3nnNhyuI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53271: ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() Date: Tue, 16 Sep 2025 10:07:09 +0200 Message-ID: <2025091603-CVE-2023-53271-5054@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=4171; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MEjKr+SbQrPPAsLxAt+RGXxHpD0IjxFlO/owVod71vU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknpZZP/bh/iUMq87Q9+b8OHX3jqTb7mvpvdfGfmxxyW pdU5xld7IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJrD/NML/22epy8yqzJUZH K2wlGSctD/1oJskwV561wJynylRe4/TJF5dfl9ppNRevAgA= 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: ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() There is a memory leaks problem reported by kmemleak: unreferenced object 0xffff888102007a00 (size 128): comm "ubirsvol", pid 32090, jiffies 4298464136 (age 2361.231s) hex dump (first 32 bytes): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace: [] __kmalloc+0x4d/0x150 [] ubi_eba_create_table+0x76/0x170 [ubi] [] ubi_resize_volume+0x1be/0xbc0 [ubi] [] ubi_cdev_ioctl+0x701/0x1850 [ubi] [] __x64_sys_ioctl+0x11d/0x170 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 This is due to a mismatch between create and destroy interfaces, and in detail that "new_eba_tbl" created by ubi_eba_create_table() but destroyed by kfree(), while will causing "new_eba_tbl->entries" not freed. Fix it by replacing kfree(new_eba_tbl) with ubi_eba_destroy_table(new_eba_tbl) The Linux kernel CVE team has assigned CVE-2023-53271 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 4.14.308 with commit 09780a44093b53f9cbca76246af2e4ff0884e512 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 4.19.276 with commit 26ec2d66aecab8ff997b912c20247fedba4f5740 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 5.4.235 with commit 07b60f7452d2fa731737552937cb81821919f874 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 5.10.173 with commit 31d60afe2cc2b712dbefcaab6b7d6a47036f844e Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 5.15.100 with commit 95a72417dd13ebcdcb1bd0c5d4d15f7c5bfbb288 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 6.1.18 with commit 27b760b81951d8d5e5c952a696af8574052b0709 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 6.2.5 with commit 5c0c81a313492b83bd0c038b8839b0e04eb87563 Issue introduced in 4.9 with commit 799dca34ac543485f581bd8464ec9b1c4f0f852a and fixed in 6.3 with commit 1e591ea072df7211f64542a09482b5f81cb3ad27 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-53271 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/mtd/ubi/vmt.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/09780a44093b53f9cbca76246af2e4ff0884e512 https://git.kernel.org/stable/c/26ec2d66aecab8ff997b912c20247fedba4f5740 https://git.kernel.org/stable/c/07b60f7452d2fa731737552937cb81821919f874 https://git.kernel.org/stable/c/31d60afe2cc2b712dbefcaab6b7d6a47036f844e https://git.kernel.org/stable/c/95a72417dd13ebcdcb1bd0c5d4d15f7c5bfbb288 https://git.kernel.org/stable/c/27b760b81951d8d5e5c952a696af8574052b0709 https://git.kernel.org/stable/c/5c0c81a313492b83bd0c038b8839b0e04eb87563 https://git.kernel.org/stable/c/1e591ea072df7211f64542a09482b5f81cb3ad27