From mboxrd@z Thu Jan 1 00:00:00 1970 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 9B2A4215774 for ; Wed, 26 Feb 2025 02:13:51 +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=1740536031; cv=none; b=tipkLaQLi4Less37kSowpgyHG98NYtvwWqBUbNpWg4AyTn7GhXMPN3hqCZ7lyNZhPPD9XK/tanWdyAUH0yhRh48eqxgWsAEQ88qhhWJCwBR8YVf4Tz/A6fmNJNpuwY+/Enid6EJQOGEX4aZeuiLAwgb2PryIt5CNa1rZSpDJFQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536031; c=relaxed/simple; bh=EidVLt1UihCbxeEr6G04/kIe5epX5dlbaEEHVO+FQ0w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hIfKZX/rc9f9Me2WPJx5fBwWJt1acn2ZQR/S6qfpwN251tQJXSo1jA5yavXzjC8fjJeawhyDSXvwOiwHurblYd9e484QPJSrfMNKoATSyTE3scFTViKGi7b8Sgr7m3nDSwvOkRgA2AJuwe9tvWUC7CRhmqGPo5/uiTFE+Lf6yBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BdTpWB7/; 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="BdTpWB7/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70670C4CEDD; Wed, 26 Feb 2025 02:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536031; bh=EidVLt1UihCbxeEr6G04/kIe5epX5dlbaEEHVO+FQ0w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BdTpWB7/xfW+Ht4+EA+LBs18HDZGHFdYsGh+oa2nSqq1vPrtnXMr4ZJ59J/CdTigp /sKl3EvxI0CyYFzuTsQPczYsR+NdafF5uRGXeNBjy3hRW609XD0UZySN33BPxEpXRP x83EYMOkPPUZL1voEdqbGEsDWE537khGwGVGFWNI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49381: jffs2: fix memory leak in jffs2_do_fill_super Date: Wed, 26 Feb 2025 03:10:55 +0100 Message-ID: <2025022647-CVE-2022-49381-89d2@gregkh> X-Mailer: git-send-email 2.48.1 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=5014; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EidVLt1UihCbxeEr6G04/kIe5epX5dlbaEEHVO+FQ0w=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yl/fiAjP+WXZI7pGocihXYiVx8m88bSgQthiT/neB 7K/Nnl0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwESk3zMsOJOyWHJr8KPoEwZv 90U7ln4z4H5mzjA/Vslo1uM/1Ywzn68I3tPSt6r1UdF1AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: jffs2: fix memory leak in jffs2_do_fill_super If jffs2_iget() or d_make_root() in jffs2_do_fill_super() returns an error, we can observe the following kmemleak report: -------------------------------------------- unreferenced object 0xffff888105a65340 (size 64): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) 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: [] kmem_cache_alloc_trace+0x475/0x8a0 [] jffs2_sum_init+0x96/0x1a0 [] jffs2_do_mount_fs+0x745/0x2120 [] jffs2_do_fill_super+0x35c/0x810 [] jffs2_fill_super+0x2b9/0x3b0 [...] unreferenced object 0xffff8881bd7f0000 (size 65536): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) hex dump (first 32 bytes): bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ backtrace: [] kmalloc_order+0xda/0x110 [] kmalloc_order_trace+0x21/0x130 [] __kmalloc+0x711/0x8a0 [] jffs2_sum_init+0xd9/0x1a0 [] jffs2_do_mount_fs+0x745/0x2120 [] jffs2_do_fill_super+0x35c/0x810 [] jffs2_fill_super+0x2b9/0x3b0 [...] -------------------------------------------- This is because the resources allocated in jffs2_sum_init() are not released. Call jffs2_sum_exit() to release these resources to solve the problem. The Linux kernel CVE team has assigned CVE-2022-49381 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 4.9.318 with commit 4ba7bbeab8009faf3a726e565d98816593ddd5b0 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 4.14.283 with commit 4da8763a3d2b684c773b72ed80fad40bc264bc40 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 4.19.247 with commit 28048a4cf3813b7cf5cc8cce629dfdc7951cb1c2 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.4.198 with commit d3a4fff1e7e408c32649030daa7c2c42a7e19a95 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.10.122 with commit 3252d327f977b14663a10967f3b0930d6c325687 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.15.47 with commit ecc53e58596542791e82eff00702f8af7a313f70 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.17.15 with commit cf9db013e167bc8fc2ecd7a13ed97a37df0c9dab Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.18.4 with commit 69295267c481545f636b69ff341b8db75aa136b9 Issue introduced in 2.6.15 with commit e631ddba588783edd521c5a89f7b2902772fb691 and fixed in 5.19 with commit c14adb1cf70a984ed081c67e9d27bc3caad9537c 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-2022-49381 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/jffs2/fs.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/4ba7bbeab8009faf3a726e565d98816593ddd5b0 https://git.kernel.org/stable/c/4da8763a3d2b684c773b72ed80fad40bc264bc40 https://git.kernel.org/stable/c/28048a4cf3813b7cf5cc8cce629dfdc7951cb1c2 https://git.kernel.org/stable/c/d3a4fff1e7e408c32649030daa7c2c42a7e19a95 https://git.kernel.org/stable/c/3252d327f977b14663a10967f3b0930d6c325687 https://git.kernel.org/stable/c/ecc53e58596542791e82eff00702f8af7a313f70 https://git.kernel.org/stable/c/cf9db013e167bc8fc2ecd7a13ed97a37df0c9dab https://git.kernel.org/stable/c/69295267c481545f636b69ff341b8db75aa136b9 https://git.kernel.org/stable/c/c14adb1cf70a984ed081c67e9d27bc3caad9537c