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 70CE61DDA1B for ; Thu, 1 May 2025 14:11:03 +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=1746108664; cv=none; b=WcrTMG7AxJuLKm2hEBvzFIfWyz9vFO9QTxRsAE6U/6ZLVImgOXOozplsCZnipLNKqtJdWCnd2Mp5fx/Zn1xxUDUH+mQ0G8LTyFo8E2amNaenkXpgt80QUutntg2Pg4LKdEWXur1dS3XH18yw2o0yrv1WwM7yYESvwCwLBT40hTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108664; c=relaxed/simple; bh=6U0fKCn6qnJXu7JdSxppHsh0KRsUPkLkMeaHWfKXMAs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cf2sOTUrdh3W9AFBR/WX3aQydGvT31lwb6Qw8bzIoMT4amd3dLOgRGTwotM3Ck00sM26LUjmYtKXcrVaO1EAqmHdNyVdOvazCK5oDkmMZ+U4evBVxgPi9GPBW9bR8trEWEOyGTc2nDBYqaYdYZD3A7WsJe0iwjE3bziBVQ/Zgrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pxRczw3D; 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="pxRczw3D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82133C4CEE3; Thu, 1 May 2025 14:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108663; bh=6U0fKCn6qnJXu7JdSxppHsh0KRsUPkLkMeaHWfKXMAs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pxRczw3DbC3mfjbcYKVuQJOV8xUZUquI/kV2+0/inVieilE8B4oLi2KBmf2VcoaeO 3csmG3e+AvbZg63nNs3/jmdY5B+s0bN3ldgT/wxkRaYOKvcx2av5BuT1Q85Ze51WZX Rn/aLKFa3rs2gLulsgYuzeEXTANKBBBKqW191j+s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49765: net/9p: use a dedicated spinlock for trans_fd Date: Thu, 1 May 2025 16:09:15 +0200 Message-ID: <2025050113-CVE-2022-49765-731b@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=2387; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0B+t2a13WfS41/MYvqpMn61Nbakh8ocpz+vg1+4fWOo=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDZ29DvIP/N49/dkX0NK4I2jLqiY3FpnOCR+iDVoyT uaGlvh0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQ2yTLML3uhkJ1y4b/ACtbp b12m9F9nn1NtwjDfPU18V/q2H+9mV6ce9bCYcvth19sWAA== 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: net/9p: use a dedicated spinlock for trans_fd Shamelessly copying the explanation from Tetsuo Handa's suggested patch[1] (slightly reworded): syzbot is reporting inconsistent lock state in p9_req_put()[2], for p9_tag_remove() from p9_req_put() from IRQ context is using spin_lock_irqsave() on "struct p9_client"->lock but trans_fd (not from IRQ context) is using spin_lock(). Since the locks actually protect different things in client.c and in trans_fd.c, just replace trans_fd.c's lock by a new one specific to the transport (client.c's protect the idr for fid/tag allocations, while trans_fd.c's protects its own req list and request status field that acts as the transport's state machine) The Linux kernel CVE team has assigned CVE-2022-49765 to this issue. Affected and fixed versions =========================== Fixed in 5.15.80 with commit 43bbadb7e4636dc02f6a283c2a39e6438e6173cd Fixed in 6.0.10 with commit 717b9b4f38703d7f5293059e3a242d16f76fa045 Fixed in 6.1 with commit 296ab4a813841ba1d5f40b03190fd1bd8f25aab0 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-2022-49765 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/43bbadb7e4636dc02f6a283c2a39e6438e6173cd https://git.kernel.org/stable/c/717b9b4f38703d7f5293059e3a242d16f76fa045 https://git.kernel.org/stable/c/296ab4a813841ba1d5f40b03190fd1bd8f25aab0