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 D25B7BA2D for ; Sat, 17 Aug 2024 09:12:06 +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=1723885926; cv=none; b=adKaq1p9u0L5eK0wIWr1MMY09CGo2Q+OUCYGIYEr5jn9/FfxSs662j18ua0uPurpmpVe7D3uotW+opANp47OtKQM9R4QTrrWosM7AZDKDgkBeoMSf1I/mlQXruk2iXzgYX1U3rDIK2UEPeGKsK/8gd6r9pTY6Tm62Mt6x3ub9FA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723885926; c=relaxed/simple; bh=nRObWYW5SFXHfcLFtHRCtfMhYJTBL6GbKHbLq7EgPYk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=e5cqYIKBfbbXHp30e+stxq7xcGzbBrYeZeQavC9mIwmkt3S7S14mGTccgPpxRGYGOtKl2GwLj9ksENZl3hIpqyVTIQoqNEKJGJQSAU4li1bduGq2pqrP7rsFAM5YVkgj5wm9JlOEU+6eVy3CwunyskLwct4p8QiwjXXxgaiqOdM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h7pVh/Dt; 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="h7pVh/Dt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13208C116B1; Sat, 17 Aug 2024 09:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723885926; bh=nRObWYW5SFXHfcLFtHRCtfMhYJTBL6GbKHbLq7EgPYk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=h7pVh/Dt2wsr1KOiCI3D+e4N2944w82jH1H1QDlb1dLg6ZhPL5TpIvKckH+mQisgz LmQb0s0BeSOY0iNFVQ8vGOmiuJFi4EsqqP87pJ+LTThXKvH2Op8F1gwrQrb7YpM9Mb haCR/pEMu7tzQWMrbNRf01fmJ+RXOa+SRHY4pEu8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42300: erofs: fix race in z_erofs_get_gbuf() Date: Sat, 17 Aug 2024 11:10:05 +0200 Message-ID: <2024081748-CVE-2024-42300-0b29@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=2741; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nRObWYW5SFXHfcLFtHRCtfMhYJTBL6GbKHbLq7EgPYk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHMu6o7d7w2qX0TEk866RLTgejYrj/ZawsE3Fy90qbL a9jdaatI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYi85phwfnFi//PunK/c9et PLesZT+mTgpNn8uw4HSfQ6z8f5n2zslON6N1r6wsPeh7CAA= 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: erofs: fix race in z_erofs_get_gbuf() In z_erofs_get_gbuf(), the current task may be migrated to another CPU between `z_erofs_gbuf_id()` and `spin_lock(&gbuf->lock)`. Therefore, z_erofs_put_gbuf() will trigger the following issue which was found by stress test: <2>[772156.434168] kernel BUG at fs/erofs/zutil.c:58! .. <4>[772156.435007] <4>[772156.439237] CPU: 0 PID: 3078 Comm: stress Kdump: loaded Tainted: G E 6.10.0-rc7+ #2 <4>[772156.439239] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 1.0.0 01/01/2017 <4>[772156.439241] pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) <4>[772156.439243] pc : z_erofs_put_gbuf+0x64/0x70 [erofs] <4>[772156.439252] lr : z_erofs_lz4_decompress+0x600/0x6a0 [erofs] .. <6>[772156.445958] stress (3127): drop_caches: 1 <4>[772156.446120] Call trace: <4>[772156.446121] z_erofs_put_gbuf+0x64/0x70 [erofs] <4>[772156.446761] z_erofs_lz4_decompress+0x600/0x6a0 [erofs] <4>[772156.446897] z_erofs_decompress_queue+0x740/0xa10 [erofs] <4>[772156.447036] z_erofs_runqueue+0x428/0x8c0 [erofs] <4>[772156.447160] z_erofs_readahead+0x224/0x390 [erofs] .. The Linux kernel CVE team has assigned CVE-2024-42300 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit f36f3010f676 and fixed in 6.10.3 with commit 49b22e06a947 Issue introduced in 6.10 with commit f36f3010f676 and fixed in 6.11-rc1 with commit 7dc5537c3f8b 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-42300 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/erofs/zutil.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/49b22e06a947727a6d1c802d2d9ad92420b90fc5 https://git.kernel.org/stable/c/7dc5537c3f8be87e005f0844a7626c987914f8fd