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 C397E57319 for ; Fri, 17 May 2024 14:02:14 +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=1715954534; cv=none; b=qXzadMayh4Wu1QbFaiC/09YTrWzre41k0e1s80nqOmM+M+7uK5XzmdbDpdLfTVAo2R2ybIsOwic8WayTvuCYf0haV/XPmLo/yJ72dCWchrmtBVXg5HUByojdqHJ6AKq7GTvA9ZVrf3wDyrXcun2NNDtvRIJGE1Lj+LwwaygsDgc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715954534; c=relaxed/simple; bh=iJdEuJR4P36qusd+W6jqkuMBMDe+DR46j685e/D67WU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hoewuunF6golLaG7lPvLveGIAVclxyLhzMqoEMdhAa8hPwbxDEx23TE1PC9SC15FZu9m1hEC7vbuDuL4Z6zHl6T2P2ilNBb5vvputpqU1z4uHH7Y/3hAr91o05q92rz3+Q9Fb8l4GeuLR8SaKTgfswL9S+K/rysni0r+8AdXIJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QNRTZB6e; 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="QNRTZB6e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4727BC2BD10; Fri, 17 May 2024 14:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715954534; bh=iJdEuJR4P36qusd+W6jqkuMBMDe+DR46j685e/D67WU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QNRTZB6es/A+g6rpo3k2l+qc5Lujfs1F8dyFgZPsTi6Tn6yFplkSUSfhMofbr+JAH zhG3ZzVUNoPpkwkvDLjatI9WInIoBAz3MSrsIalVSFv0G0IOp4Urm2mKdBDB4b80Xg 8olmpCiDYgwII2iPtWqt3msUy8vGHQXLf5vNvQpI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52672: pipe: wakeup wr_wait after setting max_usage Date: Fri, 17 May 2024 16:01:33 +0200 Message-ID: <2024051729-CVE-2023-52672-f30c@gregkh> X-Mailer: git-send-email 2.45.1 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=2942; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iJdEuJR4P36qusd+W6jqkuMBMDe+DR46j685e/D67WU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnuyZbHju23XPH5bb3Gned9bplebtt1JVkyhcStb+d6t riWcF/tiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIkcjWdY0OAUySjZ/O5023VF /9ywrA0aS1i3MMzhXsPGuGLKG96ssCaZsoxVJ2vqf/8DAA== 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: pipe: wakeup wr_wait after setting max_usage Commit c73be61cede5 ("pipe: Add general notification queue support") a regression was introduced that would lock up resized pipes under certain conditions. See the reproducer in [1]. The commit resizing the pipe ring size was moved to a different function, doing that moved the wakeup for pipe->wr_wait before actually raising pipe->max_usage. If a pipe was full before the resize occured it would result in the wakeup never actually triggering pipe_write. Set @max_usage and @nr_accounted before waking writers if this isn't a watch queue. [Christian Brauner : rewrite to account for watch queues] The Linux kernel CVE team has assigned CVE-2023-52672 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit c73be61cede5 and fixed in 5.10.210 with commit 162ae0e78bda Issue introduced in 5.8 with commit c73be61cede5 and fixed in 5.15.149 with commit 3efbd114b915 Issue introduced in 5.8 with commit c73be61cede5 and fixed in 6.1.76 with commit b87a1229d866 Issue introduced in 5.8 with commit c73be61cede5 and fixed in 6.6.15 with commit 68e51bdb1194 Issue introduced in 5.8 with commit c73be61cede5 and fixed in 6.7.3 with commit 6fb70694f8d1 Issue introduced in 5.8 with commit c73be61cede5 and fixed in 6.8 with commit e95aada4cb93 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-2023-52672 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/pipe.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/162ae0e78bdabf84ef10c1293c4ed7865cb7d3c8 https://git.kernel.org/stable/c/3efbd114b91525bb095b8ae046382197d92126b9 https://git.kernel.org/stable/c/b87a1229d8668fbc78ebd9ca0fc797a76001c60f https://git.kernel.org/stable/c/68e51bdb1194f11d3452525b99c98aff6f837b24 https://git.kernel.org/stable/c/6fb70694f8d1ac34e45246b0ac988f025e1e5b55 https://git.kernel.org/stable/c/e95aada4cb93d42e25c30a0ef9eb2923d9711d4a