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 7771E17995 for ; Fri, 5 Jul 2024 06:42: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=1720161738; cv=none; b=SzT8ABWTFt9auMVKx+N1P3OOi0eUkL33rUOBUUsG6odt1jjUlrIaSiHAh8sSWMEx4n+83grWO3dI/E6ukQm8sQ07tt3CgGJ7gPoscXbQBW6H/yKv0k+9bfPLqFW9nw2jJXx032x0brJsnSXCNHpk7fr6QovnbsXtcb1Kjm8bL4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720161738; c=relaxed/simple; bh=AdocLvnkxsnecDv6tMmK0h+NlcuyntAxI3BbrUpGDJ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SWZolDXGMIA1SspT+hT1FLSmmTda0Pj/nxkT5+ql/YPfiGkmEAB5jT7F0lA0rxEnpcnUqFDkA3eZp752Kk54lp2hu5dW5TKgSLnJhOOuJULUA3WxTVAkpm2KZ/MFTEXWLQ1X3QA/xuXmqmUsRKvDvCNo+xku8PsaJkD3xY6iBZ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jnIBGcOt; 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="jnIBGcOt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7DAFC32786; Fri, 5 Jul 2024 06:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720161738; bh=AdocLvnkxsnecDv6tMmK0h+NlcuyntAxI3BbrUpGDJ8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jnIBGcOtXE7w2xutgb9GF1WhxZi2HJ/6mh7efxNu1f873FqHUuTtemFNyMwMckXdP +8Je6OJsD9wQ8+u5BX4eDLdbqcm3gsfUkP6a/Bmi6lg05V1ZmMmP/O7GWzORJ0zntn XxmOPe0InopTvH1qcJKkWTxP90v1nv5j17Nu1X8k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-39472: xfs: fix log recovery buffer allocation for the legacy h_size fixup Date: Fri, 5 Jul 2024 08:42:13 +0200 Message-ID: <2024070512-CVE-2024-39472-f977@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=2110; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AdocLvnkxsnecDv6tMmK0h+NlcuyntAxI3BbrUpGDJ8=; b=owGbwMvMwCRo6H6F97bub03G02pJDGntU48UZy4Uy61i6Xl/XfT/1V85P+6ZxFvGXmJIknGam Z4bIlndEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPZupJhwaaskhwxmzP6BWGq Od8Zl8t5xvc8Y1hwvCPmtwBf3/cOwasWRbpuxkGcltEA 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: xfs: fix log recovery buffer allocation for the legacy h_size fixup Commit a70f9fe52daa ("xfs: detect and handle invalid iclog size set by mkfs") added a fixup for incorrect h_size values used for the initial umount record in old xfsprogs versions. Later commit 0c771b99d6c9 ("xfs: clean up calculation of LR header blocks") cleaned up the log reover buffer calculation, but stoped using the fixed up h_size value to size the log recovery buffer, which can lead to an out of bounds access when the incorrect h_size does not come from the old mkfs tool, but a fuzzer. Fix this by open coding xlog_logrec_hblks and taking the fixed h_size into account for this calculation. The Linux kernel CVE team has assigned CVE-2024-39472 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 0c771b99d6c9 and fixed in 6.10-rc1 with commit 45cf976008dd 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-39472 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/xfs/xfs_log_recover.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/45cf976008ddef4a9c9a30310c9b4fb2a9a6602a