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 AAD7717164C for ; Fri, 21 Jun 2024 10:28:22 +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=1718965702; cv=none; b=TDtK0+7b+9KEFXWOuLHkSN//eO62Kt4296jLtwOWIpabDKZ36kuaSb0vFKI4cDvL14SCECi6nUcktRFFgRo5JN6n9ffWsFrb+dNMR4Ch7L6o0+GFCuAhjO6UbEypEyCTNoHV+fWWYvVsh/i/UlcAr4eViBduxdzsl47lP6T7Ax8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718965702; c=relaxed/simple; bh=yFU/TKW2PKdeXNMdoxErg9MT199bSqx/vdnPalK5jf4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q84MdI5b2/L6HXnmaTXqRKaFdXIV0xctXXg5MXVDYPU86ChakVQvxfPeT0uNY7VdwAHooXIc0uYgjK49pMTts/H6GKpGF2Tp4qQDFkSCxTzZH/i4dwoTYiLOwszysXxsZmK8SHZ9aWywVVapF8DyOhZ+Km2SNyJsL9cd+CHn5fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=o5vMV+0B; 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="o5vMV+0B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBE68C2BBFC; Fri, 21 Jun 2024 10:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718965702; bh=yFU/TKW2PKdeXNMdoxErg9MT199bSqx/vdnPalK5jf4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=o5vMV+0BNttedDmrn1yuhCgJaZ0Qr8r/NQCTgHFTU0+khIG0yaeNw0GKvum4j3SKQ Ztz3iihqlgrktFo+eliNnPhtybrk6XJuVD1od4my1/m1/rhn1uA9KA4M+RTzz08Ow6 np3q7HHbiXyDRe9uE/CUXg54I42hpQx80lHkiarI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38659: enic: Validate length of nl attributes in enic_set_vf_port Date: Fri, 21 Jun 2024 12:28:19 +0200 Message-ID: <2024062118-CVE-2024-38659-d373@gregkh> X-Mailer: git-send-email 2.45.2 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=3502; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yFU/TKW2PKdeXNMdoxErg9MT199bSqx/vdnPalK5jf4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmloYf4tx2c//DCeq6gtg7NdqEb18JkngYriru1z7kuP 2EnMxNzRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEioNhfsyuih3cNstTtHiN mB8ejLy5pz7mCcOCDfklbZNefZdf/GeKnsDjsP0XZry2BAA= 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: enic: Validate length of nl attributes in enic_set_vf_port enic_set_vf_port assumes that the nl attribute IFLA_PORT_PROFILE is of length PORT_PROFILE_MAX and that the nl attributes IFLA_PORT_INSTANCE_UUID, IFLA_PORT_HOST_UUID are of length PORT_UUID_MAX. These attributes are validated (in the function do_setlink in rtnetlink.c) using the nla_policy ifla_port_policy. The policy defines IFLA_PORT_PROFILE as NLA_STRING, IFLA_PORT_INSTANCE_UUID as NLA_BINARY and IFLA_PORT_HOST_UUID as NLA_STRING. That means that the length validation using the policy is for the max size of the attributes and not on exact size so the length of these attributes might be less than the sizes that enic_set_vf_port expects. This might cause an out of bands read access in the memcpys of the data of these attributes in enic_set_vf_port. The Linux kernel CVE team has assigned CVE-2024-38659 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 4.19.316 with commit 2b649d7e0cb4 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 5.4.278 with commit ca63fb7af9d3 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 5.10.219 with commit 3c0d36972edb Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 5.15.161 with commit 25571a12fbc8 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 6.1.93 with commit 7077c22f84f4 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 6.6.33 with commit f6638e955ca0 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 6.9.4 with commit aee1955a1509 Issue introduced in 2.6.35 with commit f8bd909183ac and fixed in 6.10-rc2 with commit e8021b94b041 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-38659 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/cisco/enic/enic_main.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/2b649d7e0cb42a660f0260ef25fd55fdc9c6c600 https://git.kernel.org/stable/c/ca63fb7af9d3e531aa25f7ae187bfc6c7166ec2d https://git.kernel.org/stable/c/3c0d36972edbe56fcf98899622d9b90ac9965227 https://git.kernel.org/stable/c/25571a12fbc8a1283bd8380d461267956fd426f7 https://git.kernel.org/stable/c/7077c22f84f41974a711604a42fd0e0684232ee5 https://git.kernel.org/stable/c/f6638e955ca00c489894789492776842e102af9c https://git.kernel.org/stable/c/aee1955a1509a921c05c70dad5d6fc8563dfcb31 https://git.kernel.org/stable/c/e8021b94b0412c37bcc79027c2e382086b6ce449