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 2006C16EBEE for ; Fri, 12 Jul 2024 12:34:00 +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=1720787641; cv=none; b=R6cunNM5+KDjdmVxj+6zMPA94Y79jU0fL4E0QsrMWJe2cuJot7xuS/a57i8ZcoQoCcx2q5OQrbms0binZFMz/MXw/23q8/OPC80MK1NG5H8urbp0GaYgof4BYU4OPqU14tKO82ZcrmAloboyt/gGL1eQRbJuEiEjqEIK9LefYvI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720787641; c=relaxed/simple; bh=0DozZ11K5wY5SX1n35+kGykLhLHulh6l3tsOA+k/Khk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FNJHUxF5PWGCH4XO97/jpWw/m4UblxsCc2tpmSLt4I+3RsPB/xhqiqv0K2qkO+wiLZFXgN6oupexroch+gWGBULJHq+C9MA3e+iuFlxg7BFZn9rf1PPPjeGjzl5U5JfDAuWgQLTqrH07eLb1xjN7pqjFlZ+FUtdfX45/PGdAZ1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=izZG4h5X; 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="izZG4h5X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DA68C32782; Fri, 12 Jul 2024 12:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720787640; bh=0DozZ11K5wY5SX1n35+kGykLhLHulh6l3tsOA+k/Khk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=izZG4h5XISUz4ypGVLq+dHNV+T++qdnos3pyaAjWtzei1YbKYwHOjSspJC4lx7DCK GSiTJfyv5ghVz/dwezF+i3g1f4b8x7Adb1vYm+y+4cI+Fv248h1DIWY7wI0/mDVCH/ n7oYVD6TilScZTeaflwDv0yTuFMevU/4hLosXxcE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-40972: ext4: do not create EA inode under buffer lock Date: Fri, 12 Jul 2024 14:32:48 +0200 Message-ID: <2024071229-CVE-2024-40972-1569@gregkh> X-Mailer: git-send-email 2.45.2 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=1957; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0DozZ11K5wY5SX1n35+kGykLhLHulh6l3tsOA+k/Khk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkTlWJbTke5+AUk8P6UEhJ9dnZBntomwe+far9uTTziF Li5+adrRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykMZRhnqHCxY/7Q16GSuZ4 7jELfyS2VEuNnWHByubMDr/lj+fNiw9N4xa4m2g/5bkZAA== 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: do not create EA inode under buffer lock ext4_xattr_set_entry() creates new EA inodes while holding buffer lock on the external xattr block. This is problematic as it nests all the allocation locking (which acquires locks on other buffers) under the buffer lock. This can even deadlock when the filesystem is corrupted and e.g. quota file is setup to contain xattr block as data block. Move the allocation of EA inode out of ext4_xattr_set_entry() into the callers. The Linux kernel CVE team has assigned CVE-2024-40972 to this issue. Affected and fixed versions =========================== Fixed in 6.9.7 with commit 111103907234 Fixed in 6.10-rc1 with commit 0a46ef234756 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-2024-40972 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/111103907234bffd0a34fba070ad9367de058752 https://git.kernel.org/stable/c/0a46ef234756dca04623b7591e8ebb3440622f0b