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 2EA771AD26C for ; Fri, 13 Sep 2024 06:28:51 +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=1726208932; cv=none; b=p3JZEGpr1aYL+uKkJlcaPeTd2kKB+W5w7MCzxGcEIJSjI3LGK/BlmFs87K4O0qPtBQUxA2LannRDlszpZBWe91XdEH8w251ZI48kr3MujApA5j3H63ZtV8aPCIAxNTmccDtY+ZKNdXSFC5QLThZf2a+ofOTekbTO3dNxQJix/6w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726208932; c=relaxed/simple; bh=WCdltOVKKwvg2Stuoqrwcgz5MSqMrbufGsr8/j6uC/U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M2YyTIeMZp47APK6PgTtJicvWTT/5NTd38U34WDeg7VNnmF5ukrRts4Mx12OH+tsLUlVKptmV6FBC6iMx07LnNhUjxOAsvop/1aaB+ybZQyyTLTXoDmtZ8oKLLH7jIjV7qc5t6v3MlEKJcd0pnyoo52ixcv4lM3MHhUFuIUZjCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wTy5N9cj; 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="wTy5N9cj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5577DC4CEC0; Fri, 13 Sep 2024 06:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726208931; bh=WCdltOVKKwvg2Stuoqrwcgz5MSqMrbufGsr8/j6uC/U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wTy5N9cjRQQIiUwxa8sYXOGWMkPHNE3dWrbP9O9WrjhW3K6rUB7De/XR8TU3kXnJZ 8tMltrZDcJvztgSEPOSEir5OLYWhufOEZ6/P1r2yndrq/G/i09buM+QQajJ5pJyxn4 vkuxm/6Ft0KwCySrFyWOKzanSIRngAMXZ67af3uI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46706: tty: serial: fsl_lpuart: mark last busy before uart_add_one_port Date: Fri, 13 Sep 2024 08:28:32 +0200 Message-ID: <2024091330-CVE-2024-46706-ea07@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=2799; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WCdltOVKKwvg2Stuoqrwcgz5MSqMrbufGsr8/j6uC/U=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmPb/dN1DeyULG4cXXh+TXBnmXfBD6fOPDAW/BcX67mR F3jGXf1OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAibosYZrP8bZxy/MPkFaor 2Tl5dr02Kkr4fJxhwcwJkn41P3Prl59TktD2kuGJNCpZBAA= 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: tty: serial: fsl_lpuart: mark last busy before uart_add_one_port With "earlycon initcall_debug=1 loglevel=8" in bootargs, kernel sometimes boot hang. It is because normal console still is not ready, but runtime suspend is called, so early console putchar will hang in waiting TRDE set in UARTSTAT. The lpuart driver has auto suspend delay set to 3000ms, but during uart_add_one_port, a child device serial ctrl will added and probed with its pm runtime enabled(see serial_ctrl.c). The runtime suspend call path is: device_add |-> bus_probe_device |->device_initial_probe |->__device_attach |-> pm_runtime_get_sync(dev->parent); |-> pm_request_idle(dev); |-> pm_runtime_put(dev->parent); So in the end, before normal console ready, the lpuart get runtime suspended. And earlycon putchar will hang. To address the issue, mark last busy just after pm_runtime_enable, three seconds is long enough to switch from bootconsole to normal console. The Linux kernel CVE team has assigned CVE-2024-46706 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 43543e6f539b and fixed in 6.6.48 with commit 8eb92cfca6c2 Issue introduced in 6.2 with commit 43543e6f539b and fixed in 6.10.7 with commit 3ecf625d4acb Issue introduced in 6.2 with commit 43543e6f539b and fixed in 6.11-rc4 with commit dc98d76a15bc 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-46706 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/tty/serial/fsl_lpuart.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/8eb92cfca6c2c5a15ab1773f3d18ab8d8f7dbb68 https://git.kernel.org/stable/c/3ecf625d4acb71d726bc0b49403cf68388b3d58d https://git.kernel.org/stable/c/dc98d76a15bc29a9a4e76f2f65f39f3e590fb15c