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 78FB118E351 for ; Tue, 20 Aug 2024 23:51:04 +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=1724197864; cv=none; b=ciqCSVT0XAz+A4UnzLWAnrRh9WUGlaf4xB/7J1G15XdbDF2zs7j+aIUReSMKTMZgLMVHpX8ZTeAUXXHo2BtuPnc2xUPkX46VVBYVCoGqdVczYlk47hyiUMo/JIUjRd1q3NhjaWpmx+kcLVfcWgsDKCGyL8b3dS4YGB0j9UEfMWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724197864; c=relaxed/simple; bh=Aaeuyd4KhL8LM1K9cXKsQwzyBQR6f50E+p6US9h9D8I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tcwryfs44AWenQLwuenip0aHU87QBiudO0ULwo3kYs3+12tGl8ie+kKppQPOyGhIJEG+IKPEm+dYnNGNDHB8nSz87JzK/NrfrfmoF0JW+QVQvkJQsbniW6J6talvApAFgD4iKLPxECIelhDxWTTvqd/Sh5+HrhAVs3IaAJpgo+k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TKTeUBri; 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="TKTeUBri" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90B4CC4AF0B; Tue, 20 Aug 2024 23:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724197863; bh=Aaeuyd4KhL8LM1K9cXKsQwzyBQR6f50E+p6US9h9D8I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TKTeUBriE6354/6MA7dpvTXtZ7QhYd8Ms87T/TbNQyelb8ndwCnfDOH66vI4bJgK6 qivlTTW7AuBIsk41Ogx/JAsaXm8YDcqF5DOD/M0gof5WVmlBIdykmWhGc4g+slXyMR FDS0svwSMOK4Mb8RulhnhPQnpxwIMGWhreJNz1UM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-43862: net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex Date: Wed, 21 Aug 2024 07:50:55 +0800 Message-ID: <2024082154-CVE-2024-43862-636a@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=2351; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Aaeuyd4KhL8LM1K9cXKsQwzyBQR6f50E+p6US9h9D8I=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlHte+VTpywYc9E9Y/XO/IuppXaf2Jll1pw4MlN7/srt NY8s0jk7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ/P7NsOCssK/UIbFjchvC OcX+Hrx83SbvrjfDgq2zYuLO7Jd/9in/gYZuFdvVNLadEQA= 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: net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex The carrier_lock spinlock protects the carrier detection. While it is held, framer_get_status() is called which in turn takes a mutex. This is not correct and can lead to a deadlock. A run with PROVE_LOCKING enabled detected the issue: [ BUG: Invalid wait context ] ... c204ddbc (&framer->mutex){+.+.}-{3:3}, at: framer_get_status+0x40/0x78 other info that might help us debug this: context-{4:4} 2 locks held by ifconfig/146: #0: c0926a38 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x12c/0x664 #1: c2006a40 (&qmc_hdlc->carrier_lock){....}-{2:2}, at: qmc_hdlc_framer_set_carrier+0x30/0x98 Avoid the spinlock usage and convert carrier_lock to a mutex. The Linux kernel CVE team has assigned CVE-2024-43862 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 54762918ca85 and fixed in 6.10.4 with commit f223d2b4acb7 Issue introduced in 6.9 with commit 54762918ca85 and fixed in 6.11-rc2 with commit c4d6a347ba7b 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-43862 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: drivers/net/wan/fsl_qmc_hdlc.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/f223d2b4acb7a45a6e0581cb380e1af1a6dc7ab9 https://git.kernel.org/stable/c/c4d6a347ba7babdf9d90a0eb24048c266cae0532