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 89C2382862 for ; Mon, 29 Jul 2024 06:37:16 +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=1722235036; cv=none; b=LcakQC/AcPUUlRi/wKdKSGTxEVfesKMXU4iyDprXNMUfWrUt5KhkAhVTXn3P5iwyZ0haCWeH9/a73Pw1VW3sOA5n0OQsSSqpvHCA7bgQumrrq4wqGVx+kvOlWTCe4l+hWSOz1+bvUgWzkmS597PoYDBoGr96dwilY/K+icfESds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722235036; c=relaxed/simple; bh=dtAlFQyJtG/gUdkTmS/SLx2JvMRG3rildwo2qL+TgA4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rpz3Qct3py0vdUjc+4ADl0qkRD6BdXmMeIeeSdVo5gezUIfK1BnLdI+3DfwCiUaVKDKLYVed6veyrdqn+0lAue6yVDg8Vss/ygGFD573lSI+YExF6U4ccy1JGBF6rWqUjeDCUOM1Ohv5demDxolMnrFeC0aEZWHMp+39VrpLFOw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FKOYr+PF; 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="FKOYr+PF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9A95C32786; Mon, 29 Jul 2024 06:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722235036; bh=dtAlFQyJtG/gUdkTmS/SLx2JvMRG3rildwo2qL+TgA4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FKOYr+PFJGGKGMAGjl64cO7ycr+zVn3aU0o6U82jCzWV1SsIdSn7rGe+vq0sfQLQJ MHylwL4sItUDAqOLL0fX1ywe7+HsUzzXUAWTU1Q6XO+7IcwJqidRGA+M/UONYWvHMo qGKkecyEf8GO1e4PvtseNU9tIjoWcKXbuXSUJne4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-41014: xfs: add bounds checking to xlog_recover_process_data Date: Mon, 29 Jul 2024 08:37:10 +0200 Message-ID: <2024072910-CVE-2024-41014-9186@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=2325; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dtAlFQyJtG/gUdkTmS/SLx2JvMRG3rildwo2qL+TgA4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLLaZpWR5bcOqY+Z53J663zJK53murclZ3576Oz7Mmc LWfcrp8riOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAm4v2fYb7LFv28M7LbeGcz 17/JjJatu7fy20uGBbvPlSYuPFClxjulMPugubi23OsjpgA= 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: add bounds checking to xlog_recover_process_data There is a lack of verification of the space occupied by fixed members of xlog_op_header in the xlog_recover_process_data. We can create a crafted image to trigger an out of bounds read by following these steps: 1) Mount an image of xfs, and do some file operations to leave records 2) Before umounting, copy the image for subsequent steps to simulate abnormal exit. Because umount will ensure that tail_blk and head_blk are the same, which will result in the inability to enter xlog_recover_process_data 3) Write a tool to parse and modify the copied image in step 2 4) Make the end of the xlog_op_header entries only 1 byte away from xlog_rec_header->h_size 5) xlog_rec_header->h_num_logops++ 6) Modify xlog_rec_header->h_crc Fix: Add a check to make sure there is sufficient space to access fixed members of xlog_op_header. The Linux kernel CVE team has assigned CVE-2024-41014 to this issue. Affected and fixed versions =========================== Fixed in 6.11-rc1 with commit fb63435b7c7d 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-41014 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/fb63435b7c7dc112b1ae1baea5486e0a6e27b196