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 23CC43CF5E for ; Wed, 19 Jun 2024 14:56:01 +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=1718808961; cv=none; b=dNK9ZDOVV9/bpXi/U99vI75aF4qjY01j+m0faFSkrQvb+hjqOXnOp0G8kSYEkToLJW1Jip22AdhTpWkPCz28jE7egXGMGriaeFDWhlEQLNOQUdB5/n9kgwDSiSLbVYhhllew9cMORH6WTl5exU0MmRWE4iBkOKjvOd3Ys3v1fXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718808961; c=relaxed/simple; bh=WYvzMPXPw1+xODjQ5YLZCwo+el5qpXvLi3ya2KZUdcI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nKfUSsZqgATunstKgUDKD7zxnVw5p0ZSSJ41XvNGxUienYQi8foFLz2hkCHoZj0IHa03/PZJOQKjcuSq5xvOLEv47I46HImY7xHu6k4ogTFH3F/FHpMViZKHEi/vSstOFqAFbL7gPNX1/XXvalphslxev1LX+ecjtU/H22Ws02Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I+rdZAKq; 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="I+rdZAKq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99CF5C4AF09; Wed, 19 Jun 2024 14:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718808961; bh=WYvzMPXPw1+xODjQ5YLZCwo+el5qpXvLi3ya2KZUdcI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=I+rdZAKqnk+MeVRv/PiD3NwiDlwIrM/0eUPakbBpsvFcWDYg8BMmoHht/GyRi2O+T TpHGegEQ4giMTrRbKCffOIbaWSN+wmyWPfS4gMkDwJnuCP5bivn1S6VueqPa232DCD YH39s6XnL8ILuDGJVpwbOj/Qv4ezX+17IpSVzoz4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47604: vduse: check that offset is within bounds in get_config() Date: Wed, 19 Jun 2024 16:54:43 +0200 Message-ID: <2024061923-CVE-2021-47604-e309@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=2179; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WYvzMPXPw1+xODjQ5YLZCwo+el5qpXvLi3ya2KZUdcI=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlFH+X3ukY9fHPi3lF+5hOveu12Gj81iw94+6Y4cFHtt LafC/UYOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi0eIM83Neibxte2zEkOa/ 3Ks6NX/l7S8ftRkWTHhWVq41h+FZ/fb1n/MYgtct4XFxBAA= 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: vduse: check that offset is within bounds in get_config() This condition checks "len" but it does not check "offset" and that could result in an out of bounds read if "offset > dev->config_size". The problem is that since both variables are unsigned the "dev->config_size - offset" subtraction would result in a very high unsigned value. I think these checks might not be necessary because "len" and "offset" are supposed to already have been validated using the vhost_vdpa_config_validate() function. But I do not know the code perfectly, and I like to be safe. The Linux kernel CVE team has assigned CVE-2021-47604 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit c8a6153b6c59 and fixed in 5.15.11 with commit ebbbc5fea3f6 Issue introduced in 5.15 with commit c8a6153b6c59 and fixed in 5.16 with commit dc1db0060c02 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-2021-47604 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/vdpa/vdpa_user/vduse_dev.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/ebbbc5fea3f648175df1aa3f127c78eb0252cc2a https://git.kernel.org/stable/c/dc1db0060c02d119fd4196924eff2d1129e9a442