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 5E4C029B224 for ; Tue, 30 Dec 2025 12:14:18 +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=1767096858; cv=none; b=b03iLzFdMzWNPNFUcfsQNixaKkb6eB0I41cMvPmfzV55rjSVwCwisWrtUgoFej9DMICcTbB9WMWPfC9QluHyUd5lTAX2yOmqGdN7gLuLDfN6byPXMIu95gVCQ2GpCEgQw7petcQ7gyU40KumPAtdE8Tka80oZJa+OIPw6J4fml0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096858; c=relaxed/simple; bh=fOFnd+jC93gBQV0QvcCnfaF+vkQ+yeuF3vsWGTvbGcA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hOCDsl0UDIhwTauEETGwDdGKAK4qQ0EE7/JmRwbCwWigkqBfydDpgFYU05/97Wg1l0OeIKCkw4rbhXAB3QmE8b0suNOBE+YfqsR0VZpPUYI45jTSd3KgCR/azqtmWjK2iNsOrI1rZWGeKFWitggooijMhRPEnvfLJzJSSe2JERU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wI4BRdbP; 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="wI4BRdbP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD865C4CEFB; Tue, 30 Dec 2025 12:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096858; bh=fOFnd+jC93gBQV0QvcCnfaF+vkQ+yeuF3vsWGTvbGcA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=wI4BRdbPORIhcEx8hjlhMPmZW8HKuxQTiq64CTsGzMNrcpl9HffPnWAiGAikytAzB +mDwBl9lKD8gi4K6s5GGBhhGHK7GG5OD+CMa090V9SxWYYbKEmEVEPQO7v+tE++/XY KxTWwBuzfLRWajgHsXhk/HQcoXt4wyF4OpAXncE0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50845: ext4: fix inode leak in ext4_xattr_inode_create() on an error path Date: Tue, 30 Dec 2025 13:13:31 +0100 Message-ID: <2025123021-CVE-2022-50845-367a@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3216; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=a/6+dbFJiCDm8/S3C1u56qT7NU7D9Xy8WZ38I3lwxL4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBBx/K6tkGWGluOiV8cWsE058DPC8k7cs8L/12X7kvf SrH2nOzOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAis/gZFnSrmkeIOzQ088tV v33T+cF9rkPwK4YFlxde23HIbm5mxOrf54KvHctccu7pfAA= 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: ext4: fix inode leak in ext4_xattr_inode_create() on an error path There is issue as follows when do setxattr with inject fault: [localhost]# fsck.ext4 -fn /dev/sda e2fsck 1.46.6-rc1 (12-Sep-2022) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Unattached zero-length inode 15. Clear? no Unattached inode 15 Connect to /lost+found? no Pass 5: Checking group summary information /dev/sda: ********** WARNING: Filesystem still has errors ********** /dev/sda: 15/655360 files (0.0% non-contiguous), 66755/2621440 blocks This occurs in 'ext4_xattr_inode_create()'. If 'ext4_mark_inode_dirty()' fails, dropping i_nlink of the inode is needed. Or will lead to inode leak. The Linux kernel CVE team has assigned CVE-2022-50845 to this issue. Affected and fixed versions =========================== Fixed in 4.14.303 with commit 0f709e08caffb41bbc9b38b9a4c1bd0769794007 Fixed in 4.19.270 with commit eab94a46560f68d4bcd15222701ced479f84f427 Fixed in 5.4.229 with commit 9ef603086c5b796fde1c7f22a17d0fc826ba54cb Fixed in 5.10.163 with commit 9882601ee689975c1c0076ee65bf222a2a35e535 Fixed in 5.15.87 with commit 322cf639b0b7f137543072c55545adab782b3a25 Fixed in 6.0.18 with commit fdaaf45786dc8c17a72901021772520fceb18f8c Fixed in 6.1.4 with commit 70e5b46beba64706430a87a6d516054225e8ac8a Fixed in 6.2 with commit e4db04f7d3dbbe16680e0ded27ea2a65b10f766a 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-50845 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/xattr.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/0f709e08caffb41bbc9b38b9a4c1bd0769794007 https://git.kernel.org/stable/c/eab94a46560f68d4bcd15222701ced479f84f427 https://git.kernel.org/stable/c/9ef603086c5b796fde1c7f22a17d0fc826ba54cb https://git.kernel.org/stable/c/9882601ee689975c1c0076ee65bf222a2a35e535 https://git.kernel.org/stable/c/322cf639b0b7f137543072c55545adab782b3a25 https://git.kernel.org/stable/c/fdaaf45786dc8c17a72901021772520fceb18f8c https://git.kernel.org/stable/c/70e5b46beba64706430a87a6d516054225e8ac8a https://git.kernel.org/stable/c/e4db04f7d3dbbe16680e0ded27ea2a65b10f766a