From mboxrd@z Thu Jan 1 00:00:00 1970 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 6A7A91F8EEC for ; Mon, 21 Oct 2024 19:41:58 +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=1729539718; cv=none; b=dcJXXMNHOLaa8LIRtrVjpUJd84RSD/kDBgpPFD2s06bxW+kzCEBXuq0i5NT4Ni1izOUry55Yn89dlAxwCJDiN5FOb56d5kvf5MdEp/xqlefCEhFICJrKqtNMqS9XRma5cg+pyvAoJpJYjDTGZdN8XvlMH9zJiwAr6O18w37VSbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729539718; c=relaxed/simple; bh=ENoEjm/FfmRLdSPzNuZN4C7zVxNeu+CLlcOITH4FMk0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HEczl4nThh2aaAOETMCDsHwwut/mmZEiYBE5aCq38ZDTHwQqAfyElSsDyrdSVyTrNPizK3RdDe22AknvW1YI9TX4AAOlUXaduQwKNOuId77PeUJ9+gGe5//0MImTm3bQJF//KPHxuW6B6RgJkcjlk4erOcbqR8a75emugCaDTTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YE9VGEgI; 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="YE9VGEgI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF947C4CEC3; Mon, 21 Oct 2024 19:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729539718; bh=ENoEjm/FfmRLdSPzNuZN4C7zVxNeu+CLlcOITH4FMk0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YE9VGEgIW/vfC126U640MQkILnOKyOBEhYBy1pfbbhuyBd3/OpclUdNzAJWDgPXd5 MxE4DnIH7mWJ4H2EXTP0+zhwzEHDMIh2SS0TIopeqaB5eIeU08ecDsk6EiIny91fyq q9T58ya2p9hiZ3NXJTh7ouXhWL3vFVYi9kRCB48A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50058: serial: protect uart_port_dtr_rts() in uart_shutdown() too Date: Mon, 21 Oct 2024 21:39:59 +0200 Message-ID: <2024102135-CVE-2024-50058-e827@gregkh> X-Mailer: git-send-email 2.47.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=2314; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ENoEjm/FfmRLdSPzNuZN4C7zVxNeu+CLlcOITH4FMk0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlia78nmoiV8h34kzWhaYVtcq/hEiHLTfEBGqfsjuSf2 iR7PMqwI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbys5RhfjVfsbVj8JYVli/+ 8m154XXy1UkuNoZ5+g/yQh9fTEq4XZne0zBTWOn/bvZ0AA== 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: serial: protect uart_port_dtr_rts() in uart_shutdown() too Commit af224ca2df29 (serial: core: Prevent unsafe uart port access, part 3) added few uport == NULL checks. It added one to uart_shutdown(), so the commit assumes, uport can be NULL in there. But right after that protection, there is an unprotected "uart_port_dtr_rts(uport, false);" call. That is invoked only if HUPCL is set, so I assume that is the reason why we do not see lots of these reports. Or it cannot be NULL at this point at all for some reason :P. Until the above is investigated, stay on the safe side and move this dereference to the if too. I got this inconsistency from Coverity under CID 1585130. Thanks. The Linux kernel CVE team has assigned CVE-2024-50058 to this issue. Affected and fixed versions =========================== Fixed in 6.6.57 with commit e418d91195d2 Fixed in 6.11.4 with commit 76ed24a34223 Fixed in 6.12-rc1 with commit 602babaa84d6 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-50058 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/serial_core.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/e418d91195d29d5f9c9685ff309b92b04b41dc40 https://git.kernel.org/stable/c/76ed24a34223bb2c6b6162e1d8389ec4e602a290 https://git.kernel.org/stable/c/602babaa84d627923713acaf5f7e9a4369e77473