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 3201C21A457 for ; Thu, 8 May 2025 06:40:33 +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=1746686434; cv=none; b=F0W/sFiUUT0b8goYTrQJvzLPb6nYef60QMwXErRbM4hyS32yETiUn/bdl390LFYscjnWt9h0kstSUhFE9JdCOCLZCg+mc4OQbtfj1EXVCQ6rf3qzrq3ekC1lrv8pyQzcHDCi6IkXfBT8WoQH6Q0DRqxwXdiu8jFMV8sDn11WWx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746686434; c=relaxed/simple; bh=27I+jhx9QcxmMNnogL1J4QJ0zHIdrXLVN6Sapn7BZZs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kgBb60Vd/z+cRJO0+ukjumsIJgcHlN8z8Zn2EE97YNQCwBUn/XOQZ6j8fqdPhOiAafK8rA8g3PuB6xSO5+9OX5cymf1pqak7VgjF59sgNEG0KNvaV2ykFIKJYrYg7NTAVpc3wMFR/iqQ7KAabxpqKYHyOJo8+tbGVFwmmN0nenI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tMGDaFT4; 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="tMGDaFT4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51D97C4CEEF; Thu, 8 May 2025 06:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746686433; bh=27I+jhx9QcxmMNnogL1J4QJ0zHIdrXLVN6Sapn7BZZs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tMGDaFT4F7F8bawQeBiLGROuwDhTArow3NZnW32ngNcTiF2kxxANfdyJw7j8Nh6Oc oNZgDQdZt3bg7+eB8rx1ZySnCoHmq8yFTnjJtjEvsdrRVJIIo/8RUMBHDxtuw7BZxw KXpUTyNJsu1xDBzQkR7OISU/UIt16bMt9oVo0EF0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37804: io_uring: always do atomic put from iowq Date: Thu, 8 May 2025 08:39:13 +0200 Message-ID: <2025050814-CVE-2025-37804-9c2b@gregkh> X-Mailer: git-send-email 2.49.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=2503; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=anGil4bsET7pRlB4jDp8gz4E9gGn9pdCkqmcD3D6CfE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkygZPk/O3e9R/JjF9j6r55+ZEPO3Od/T+a877ySblxX MGKU/5+RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEcQ3DfJcpa79uLdafK3ni zb7vGiEbzxUpNjLMD+MP9f837cjcooi1DOt+TW+ZbH9XEAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring: always do atomic put from iowq io_uring always switches requests to atomic refcounting for iowq execution before there is any parallilism by setting REQ_F_REFCOUNT, and the flag is not cleared until the request completes. That should be fine as long as the compiler doesn't make up a non existing value for the flags, however KCSAN still complains when the request owner changes oter flag bits: BUG: KCSAN: data-race in io_req_task_cancel / io_wq_free_work ... read to 0xffff888117207448 of 8 bytes by task 3871 on cpu 0: req_ref_put_and_test io_uring/refs.h:22 [inline] Skip REQ_F_REFCOUNT checks for iowq, we know it's set. The Linux kernel CVE team has assigned CVE-2025-37804 to this issue. Affected and fixed versions =========================== Fixed in 6.6.89 with commit c5d4d103005d8926cdad344f9fc947e651c9f2f7 Fixed in 6.12.26 with commit 3568fd9e440ea393c7d8bee253419ea11fd8e9d9 Fixed in 6.14.5 with commit 6d2753b46452a557a12f7ef1ef4ee6641b4e89d8 Fixed in 6.15-rc1 with commit 390513642ee6763c7ada07f0a1470474986e6c1c 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-2025-37804 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: io_uring/io_uring.c io_uring/refs.h 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/c5d4d103005d8926cdad344f9fc947e651c9f2f7 https://git.kernel.org/stable/c/3568fd9e440ea393c7d8bee253419ea11fd8e9d9 https://git.kernel.org/stable/c/6d2753b46452a557a12f7ef1ef4ee6641b4e89d8 https://git.kernel.org/stable/c/390513642ee6763c7ada07f0a1470474986e6c1c