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 068EB2163AF for ; Wed, 26 Feb 2025 02:13:59 +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=1740536039; cv=none; b=cZaXqfsP0QAVZ/hVjpLfLZQrt7MXlTnMPKiJdJ2fLfiupqjmEfh5uqxo52gD4cVE/m0GowOu+wOEGxhHmKcAq/jf4s9PeUEePMTGmMHbVwwfb+sKJLrLMBvmcfq50hJ1cJ0L4FX4H3o5cgui409bsT3nmPeYxpW8WVyioBckcy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536039; c=relaxed/simple; bh=obZ2a9xxUCronUlZK12BNmYt6j8FPA70eicAyz1qjCk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kPKa4AgmDISKBcLUj6xMrnAxjwcrwREFWtcSV+zssbduWagVPiyqpUbPJnJ0tWi8nV/o+yZgQVVl3YtvNeWEYJx/0lF/yZyh0bsqdKCSw1k9bdDNimJZTYOtXevkPeRXBAm9vqFUWY374DG3vyCRm+7QV8s2v/NT/Fn95wmb2CQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UI/7iTNY; 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="UI/7iTNY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7AB8C4CEE6; Wed, 26 Feb 2025 02:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536038; bh=obZ2a9xxUCronUlZK12BNmYt6j8FPA70eicAyz1qjCk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UI/7iTNY4uUq7tJx61tmY/aEoYr6XQsmp7ThiZDZo6HC/xFuLHcaocJ4Ch59fNNNZ W8C0IwXblNMsK84fryrpecwsjVZXoVcrhhakUwt0aMEPT+zSSREAgTCI9U3iiYBw/H BAEFhlGpKEhjw41iY4k0nQ3IBhPZ54OjgqFAa4ds= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49408: ext4: fix memory leak in parse_apply_sb_mount_options() Date: Wed, 26 Feb 2025 03:11:22 +0100 Message-ID: <2025022652-CVE-2022-49408-2973@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=2497; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=obZ2a9xxUCronUlZK12BNmYt6j8FPA70eicAyz1qjCk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yj8IOZftD/ysWKDe6TWBYanEi29Kzc0p59bvZ0tzb LI/xGTfEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPRKmOYp+F0crrYp6t+ScK7 LYwuqfueLwxezDA/rfu9ZLvVr8Od7n+5XBqfsB9/cXYiAA== 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: ext4: fix memory leak in parse_apply_sb_mount_options() If processing the on-disk mount options fails after any memory was allocated in the ext4_fs_context, e.g. s_qf_names, then this memory is leaked. Fix this by calling ext4_fc_free() instead of kfree() directly. Reproducer: mkfs.ext4 -F /dev/vdc tune2fs /dev/vdc -E mount_opts=usrjquota=file echo clear > /sys/kernel/debug/kmemleak mount /dev/vdc /vdc echo scan > /sys/kernel/debug/kmemleak sleep 5 echo scan > /sys/kernel/debug/kmemleak cat /sys/kernel/debug/kmemleak The Linux kernel CVE team has assigned CVE-2022-49408 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 7edfd85b1ffd36593011dec96ab395912a340418 and fixed in 5.17.14 with commit 9ea3e6168948189cec31d0678d2b55b395f88491 Issue introduced in 5.17 with commit 7edfd85b1ffd36593011dec96ab395912a340418 and fixed in 5.18.3 with commit f92ded66e9d0aa20b883a2a5183973abc8f41815 Issue introduced in 5.17 with commit 7edfd85b1ffd36593011dec96ab395912a340418 and fixed in 5.19 with commit c069db76ed7b681c69159f44be96d2137e9ca989 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-49408 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/ext4/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/9ea3e6168948189cec31d0678d2b55b395f88491 https://git.kernel.org/stable/c/f92ded66e9d0aa20b883a2a5183973abc8f41815 https://git.kernel.org/stable/c/c069db76ed7b681c69159f44be96d2137e9ca989