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 7643A146D41 for ; Tue, 21 May 2024 15:39:39 +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=1716305979; cv=none; b=Oel4CBtOq42vRpkaO0ByTUZEgN859u/mlNMIP0PrMB/g4CvSxEOfVkY63agpr6aFmcn6uIcoAJetY/mYcZJknRe4hEKSqgQOOiaqoWPX3aWInN9mAgym1oMErd/pgNKdzvin1uvylDunkVD6vXDW2IlIT7PoZQGwcO2bLXryYmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305979; c=relaxed/simple; bh=k2D4oRHkJXPpA305IXmBJLasMsda6MnMetng86tlXCY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ELlTtasS8jsPty+oTWqj+D2bZN26uEyJAbGvJTj35ZtPQ0i3mGfB67pECuTVtamDGIRBNYNkeeokxaEee/PZqp7vdrWYm2unQ2ombpPIQXL0w8mjwx1YrzDo+/ZPEqrpTJWjbQ2zOWteJwKk0+iXnxpA90je74I3U1HJSxzRGTU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EuH87NaU; 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="EuH87NaU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0D71C2BD11; Tue, 21 May 2024 15:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305979; bh=k2D4oRHkJXPpA305IXmBJLasMsda6MnMetng86tlXCY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EuH87NaUdpGHw8Nk8L9waR2YQky53kVDBAUsGvFPZUN2/dfi0i2dStAMuxJfaMhJt 3MYGFk+6wu6c9adhrSpMnQOCb4YB6kWQ1FcRoiBWY0Ycubhl4TiIpFXp8L5OwpFKFp AoG+Ro/1yodSdqckxdroPp6wSM8GQ0J17QDWeJsg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52872: tty: n_gsm: fix race condition in status line change on dead connections Date: Tue, 21 May 2024 17:32:48 +0200 Message-ID: <2024052120-CVE-2023-52872-48fd@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=2984; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=k2D4oRHkJXPpA305IXmBJLasMsda6MnMetng86tlXCY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk++zydO8R17syuvZK37Y+I3uOoO5s0TVrKfjXPEnarY 0vZ7m/fEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABN5nsqwYNPczRs7i5ZOsNkx f1t4n8rNK8ptFQwLpuqEN6a949hUlRJyIvFM84Hj9r8aAA== 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: n_gsm: fix race condition in status line change on dead connections gsm_cleanup_mux() cleans up the gsm by closing all DLCIs, stopping all timers, removing the virtual tty devices and clearing the data queues. This procedure, however, may cause subsequent changes of the virtual modem status lines of a DLCI. More data is being added the outgoing data queue and the deleted kick timer is restarted to handle this. At this point many resources have already been removed by the cleanup procedure. Thus, a kernel panic occurs. Fix this by proving in gsm_modem_update() that the cleanup procedure has not been started and the mux is still alive. Note that writing to a virtual tty is already protected by checks against the DLCI specific connection state. The Linux kernel CVE team has assigned CVE-2023-52872 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.61 with commit dd37f6573878 and fixed in 5.15.138 with commit 81a4dd5e6c78 Issue introduced in 6.0 with commit c568f7086c6e and fixed in 6.1.62 with commit df6cfab66ff2 Issue introduced in 6.0 with commit c568f7086c6e and fixed in 6.5.11 with commit 19d34b73234a Issue introduced in 6.0 with commit c568f7086c6e and fixed in 6.6.1 with commit ce4df90333c4 Issue introduced in 6.0 with commit c568f7086c6e and fixed in 6.7 with commit 3a75b205de43 Issue introduced in 5.18.18 with commit d834aba5f30d Issue introduced in 5.19.2 with commit 692e847a8e66 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-52872 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/n_gsm.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/81a4dd5e6c78f5d8952fa8c9d36565db1fe01444 https://git.kernel.org/stable/c/df6cfab66ff2a44bd23ad5dd5309cb3421bb6593 https://git.kernel.org/stable/c/19d34b73234af542cc8a218cf398dee73cdb1890 https://git.kernel.org/stable/c/ce4df90333c4fe65acb8b5089fdfe9b955ce976a https://git.kernel.org/stable/c/3a75b205de43365f80a33b98ec9289785da56243