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 29CE81465B3 for ; Sat, 17 Aug 2024 09:12:53 +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=1723885973; cv=none; b=TidJ/EIRIS72enOtKB3OV+dJmse9H/rYPdu2LY1/viXX1ivje7//QCIQCm7rXbv+j01K9Ml4EloR3PO+b+w4GSFS9HzxkSdKMShbTMxSkaL5GrzkIkV/J2k4oGkPMyHBgYvELbOZRObD8KJWkLnI3Cfnx+4EJo9RitBR2RWnr6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723885973; c=relaxed/simple; bh=SAbfQ1gY1d6KuA8UATfoJEVpaIBLxKd4kdO4kNItCQY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ebg/zREHLlyKQv6s8OjhG2PHwu25I7BBjWO7PvAERJdyrZe/e7g79WFnzRlvQNj5RSFviU31BIDW/83d56M4/5tLiNAGUxHcrb5EY0+P3qar7LbYtBadW0tDwQqBCSCafKMNsNuAk/Ps8TQbRsNEnupTrrH8MS+Vlwgm0MRZHYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wIYMbAjT; 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="wIYMbAjT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2655C116B1; Sat, 17 Aug 2024 09:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723885973; bh=SAbfQ1gY1d6KuA8UATfoJEVpaIBLxKd4kdO4kNItCQY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wIYMbAjTnBv15QBsTqi7PrvlDjH00CKE1TbaO+OwLff4RxHmJWqY/+Y10LSa+pkLu 8J/QgdSeMTXwMDRZI4EdOHPSSLO9bc+es3X0Ww+rsUa/iaEeHM1BrznmxQRdiHig0c 3kQgqbjTUIQcDxIrEoXOcf5yIjdvWw6RpiSpoouo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42314: btrfs: fix extent map use-after-free when adding pages to compressed bio Date: Sat, 17 Aug 2024 11:10:19 +0200 Message-ID: <2024081752-CVE-2024-42314-de1f@gregkh> X-Mailer: git-send-email 2.46.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=2078; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SAbfQ1gY1d6KuA8UATfoJEVpaIBLxKd4kdO4kNItCQY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHMh7uyY6LPHblUK2jxKU/z/n5mrfciP1m80d1x474k 6XdF+ued8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBECpoY5icLTVDSDa6OEi9s 3vdxAQez2L6pDgzzlG0WTVxzNWmGs1yP4sqa3jt8XMkGAA== 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: fix extent map use-after-free when adding pages to compressed bio At add_ra_bio_pages() we are accessing the extent map to calculate 'add_size' after we dropped our reference on the extent map, resulting in a use-after-free. Fix this by computing 'add_size' before dropping our extent map reference. The Linux kernel CVE team has assigned CVE-2024-42314 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 6a4049102055 and fixed in 6.6.44 with commit c205565e0f2f Issue introduced in 5.16 with commit 6a4049102055 and fixed in 6.10.3 with commit b7859ff398b6 Issue introduced in 5.16 with commit 6a4049102055 and fixed in 6.11-rc1 with commit 8e7860543a94 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-42314 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/compression.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/c205565e0f2f439f278a4a94ee97b67ef7b56ae8 https://git.kernel.org/stable/c/b7859ff398b6b656e1689daa860eb34837b4bb89 https://git.kernel.org/stable/c/8e7860543a94784d744c7ce34b78a2e11beefa5c