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 631D21E884 for ; Fri, 15 Mar 2024 20:15:42 +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=1710533742; cv=none; b=fjT8aazn7ZhTLbu1Tf5A9kuFsigcUdnGS8x4J1Hkw4PakpUU0XjKa+3I1V/5o/p+bi6Q+JsRcDWjTsTd1VVFFEYPXKDdsP/08mNjIA7mbbaOXMg2mu9x3cDRp9OA3ZAQRfaYg+EYBA3EltAMGl7q0CJrHZUlNvUhpwzkW83wVPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710533742; c=relaxed/simple; bh=R8CyICg3LuZ1vtfy2Fjg3Xjt1JUXlJ38Td9EyJHYoNE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nGTDGdCr1vwJ4MWnN1JTtZGy1vlKiL6zhzvAGTsy5hFtjMzTwHaSiIMYzoaKQDcd9i2NyhpfhrxxQzi+7FPJB0iY1ZNPK8nu8ifj/GkYYU7K5fnnZNEfQbBOtAJx8cDD7n6F/HnEdLJFAhd296/55wGZNHM1COIzTg5rN9Jw1Sc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gvm6cIEo; 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="Gvm6cIEo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3E41C433F1; Fri, 15 Mar 2024 20:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1710533742; bh=R8CyICg3LuZ1vtfy2Fjg3Xjt1JUXlJ38Td9EyJHYoNE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Gvm6cIEolN3v0FcBErYSMunaNN7JVmzkoME9pbAZs+dVfBq8XbK03R1xue9CtQufx pSujQHjTygCsyZ/LJtgH6+AVTwhIl1xYYtZbnmnUKT1fYeFBtBHURZkhXoOYmKa/Pb VEL1fUcNAtuTeeC6QnepEgG3BiNTZxdvxl7Wjp2k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47113: btrfs: abort in rename_exchange if we fail to insert the second ref Date: Fri, 15 Mar 2024 21:15:03 +0100 Message-ID: <2024031507-CVE-2021-47113-bf29@gregkh> X-Mailer: git-send-email 2.44.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=2075; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=R8CyICg3LuZ1vtfy2Fjg3Xjt1JUXlJ38Td9EyJHYoNE=; b=owGbwMvMwCRo6H6F97bub03G02pJDKlf1nhfZPh258sM5/sidbfS1HdwT274ybNLfaHORofD0 vx8JnLcHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR3I8MC/b3JSl4VFj2cla4 yD/eeYwjU0SjmWGu9JeDWf/Vghl+J3BniuUdPzm/dasyAA== 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: btrfs: abort in rename_exchange if we fail to insert the second ref Error injection stress uncovered a problem where we'd leave a dangling inode ref if we failed during a rename_exchange. This happens because we insert the inode ref for one side of the rename, and then for the other side. If this second inode ref insert fails we'll leave the first one dangling and leave a corrupt file system behind. Fix this by aborting if we did the insert for the first inode ref. The Linux kernel CVE team has assigned CVE-2021-47113 to this issue. Affected and fixed versions =========================== Fixed in 5.10.43 with commit 0df50d47d174 Fixed in 5.12.10 with commit ff8de2cec65a Fixed in 5.13 with commit dc09ef356272 Please see https://www.kernel.org or 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-2021-47113 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/btrfs/inode.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/0df50d47d17401f9f140dfbe752a65e5d72f9932 https://git.kernel.org/stable/c/ff8de2cec65a8c8521faade12a31b39c80e49f5b https://git.kernel.org/stable/c/dc09ef3562726cd520c8338c1640872a60187af5