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 69CB317F504 for ; Thu, 30 May 2024 15:30:47 +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=1717083047; cv=none; b=hNxOWeT+T6Pz8FcWE1BFOv3SMA0EQYYoRoOyEKoSTYaYMDBil6FkFZmFcDVnblDPrQU8IYEJhMMrLX2rr7tp2DTn9gHyYp/0OlZbbzv0xzEJdox3eT7IokdOreS0XL+bmT5lmFqshUDCxBnGbbfDYSLAEV89dNK8FZTJJr0P1YM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717083047; c=relaxed/simple; bh=bhgRCrUuV/XJmC8XUoGnt00hSD8Z0mbdCC98mTOJ9BY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AqJ+BiwXxuxyNs2DWnMJcMQciYJ/CyjwO0CZl2xABl7iT/xkoiE0+oOdn/E2OXhtxSNyInw1/X4ejqW//vjaC6S858AvavBsVFp5DDoHd7FQBqtwgaxHKeA1nMdOZ62nxSGsjpCnfWtmA/zj0lwIJ+7asPSyzcSfb1hSmxfeifU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ujdPHZdI; 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="ujdPHZdI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0108EC32789; Thu, 30 May 2024 15:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717083047; bh=bhgRCrUuV/XJmC8XUoGnt00hSD8Z0mbdCC98mTOJ9BY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ujdPHZdIQCO03i439r3k/rIY6y9pNndx0aLWipTK58KzYkfWghCT37LA0tRgd73M4 LC4O+O/s5aqSnM1rBdJRDJ/PDtofAaWWU7PlwZ/c5QqxybEGpPtARXBbHg854aWD2M vQV0TY7JBw4Ui4OFsaKPYN4gtfs+i6OHfmqGE2WA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-36934: bna: ensure the copied buf is NUL terminated Date: Thu, 30 May 2024 17:29:26 +0200 Message-ID: <2024053042-CVE-2024-36934-cc8b@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=3009; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bhgRCrUuV/XJmC8XUoGnt00hSD8Z0mbdCC98mTOJ9BY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkRs7X65i1Y8Gp3+dO7Bw/sC701f9HxK3Wud8NSD7qtV p6/cV/uto5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSHkcwxzOb6tOPJy3/vDb qbIiVVWLdaab97IyLFijLLB6uw6H1rGtK/5EtZ/ZJ2JfyQ0A 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: bna: ensure the copied buf is NUL terminated Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from userspace to that buffer. Later, we use sscanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using sscanf. Fix this issue by using memdup_user_nul instead of memdup_user. The Linux kernel CVE team has assigned CVE-2024-36934 to this issue. Affected and fixed versions =========================== Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 4.19.314 with commit bd502ba81cd1 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 5.4.276 with commit 80578ec10335 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 5.10.217 with commit 6f0f19b79c08 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 5.15.159 with commit 0f560240b4cc Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 6.1.91 with commit 06cb37e2ba64 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 6.6.31 with commit e19478763154 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 6.8.10 with commit 1518b2b498a0 Issue introduced in 3.3 with commit 7afc5dbde091 and fixed in 6.9 with commit 8c34096c7fdf 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-36934 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/ethernet/brocade/bna/bnad_debugfs.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/bd502ba81cd1d515deddad7dbc6b812b14b97147 https://git.kernel.org/stable/c/80578ec10335bc15ac35fd1703c22aab34e39fdd https://git.kernel.org/stable/c/6f0f19b79c085cc891c418b768f26f7004bd51a4 https://git.kernel.org/stable/c/0f560240b4cc25d3de527deb257cdf072c0102a9 https://git.kernel.org/stable/c/06cb37e2ba6441888f24566a997481d4197b4e32 https://git.kernel.org/stable/c/e19478763154674c084defc62ae0d64d79657f91 https://git.kernel.org/stable/c/1518b2b498a0109eb6b15755169d3b6607356b35 https://git.kernel.org/stable/c/8c34096c7fdf272fd4c0c37fe411cd2e3ed0ee9f