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 CCE56153BE9 for ; Mon, 8 Dec 2025 00:47:46 +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=1765154866; cv=none; b=GsfqZnu51dm3J9CqNJZtvXRZ9YB4BkkgyKfv95JCfU5V/eqgeE0X0Ct/UPw6UxwO5681sFJr/UAxfkG/3hBk6GgqDDUuIaA+V39KWYy6XEVqcg730z0VI/znFaaoM3KI8drqIVV4WlkoJKVxBsKIy13KtJ6QGCXXSkIPwtasWJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765154866; c=relaxed/simple; bh=VONyVWj8qKAMt8sQszQ8BZG4ebJBSYIJJuziu/PYxxA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SyDpiyqJX94gX9Xs64MQ9mGLrqVIsnQsD0zWeDXSRioDTmSMn5Emp1z+H4GrMI+h2Vi3QR7y2fO/3myAz52QWlSITdHoHJVqBMv+SizZu/pIVjYbIn5YGOB7Y9XJWWdPaV2+bicAeUx3P0i+f/YRloDPeRauEWYK6vDpH5af7qs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oBfgdVZD; 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="oBfgdVZD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B75EC4CEFB; Mon, 8 Dec 2025 00:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765154866; bh=VONyVWj8qKAMt8sQszQ8BZG4ebJBSYIJJuziu/PYxxA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=oBfgdVZDTPAl455/e5aS9QT2uFfRnhN0iraQVq1ID96su59oksFV5ocAaOxaG98Rn Dj6SvgMNUJ5LfxzByo4Glaq5es8/gH0Vu0HbnwWpUhdJQpBmwhK3GKGQ93uiMTRUAI IibKDfafF73EN10jx9ZNPJ7dboT6BT6ahBBH5QBc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40305: 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN Date: Mon, 8 Dec 2025 09:47:29 +0900 Message-ID: <2025120820-CVE-2025-40305-d66a@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2433; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5EUfbLmm1B7L4RI4Rd75UTOtOQy4YQ6oOfLiSWys8DE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlmChKFrteduR4Hbq712pyQwc6wyFc/+rbZ9lSpWm6pA 6yXe9Z1xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQkOhnmcG94bpHdZOiQmhc1 m5Oram/Gu8AjDPP0S5n22Us5+f79MPXmLQdeP/l0KQUA 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: 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN p9_read_work() doesn't set Rworksched and doesn't do schedule_work(m->rq) if list_empty(&m->req_list). However, if the pipe is full, we need to read more data and this used to work prior to commit aaec5a95d59615 ("pipe_read: don't wake up the writer if the pipe is still full"). p9_read_work() does p9_fd_read() -> ... -> anon_pipe_read() which (before the commit above) triggered the unnecessary wakeup. This wakeup calls p9_pollwake() which kicks p9_poll_workfn() -> p9_poll_mux(), p9_poll_mux() will notice EPOLLIN and schedule_work(&m->rq). This no longer happens after the optimization above, change p9_fd_request() to use p9_poll_mux() instead of only checking for EPOLLOUT. The Linux kernel CVE team has assigned CVE-2025-40305 to this issue. Affected and fixed versions =========================== Fixed in 6.12.58 with commit 2e1461034aef99e905a1fe5589aaf00eaea73eee Fixed in 6.17.8 with commit 242531004d7de8c159f9bfadebe33fe8060b1046 Fixed in 6.18 with commit e8fe3f07a357c39d429e02ca34f740692d88967a 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-40305 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: net/9p/trans_fd.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/2e1461034aef99e905a1fe5589aaf00eaea73eee https://git.kernel.org/stable/c/242531004d7de8c159f9bfadebe33fe8060b1046 https://git.kernel.org/stable/c/e8fe3f07a357c39d429e02ca34f740692d88967a