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 91AF954670 for ; Thu, 27 Feb 2025 02:08:35 +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=1740622117; cv=none; b=Bmf/qNauToOQJPt1v9OQhKNH7/DXJ0vFYqBblGjlzB87w8nkFJ9V1qORo6wk/oAMr8VlPn7SI4Yboaq8+ooVaEMvJrTJBf2MzLgYm/W1kGIX9Da2B1fYJ1QTMTEL8Aj6kQjd3+5GZmiCpG3f3hu11iKGDii80+nGB0xsbZSEgPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622117; c=relaxed/simple; bh=BAHIbahU+lsfJf/CdjHqjuS4uLDTlzy9VzCRQ+JYTO8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ritvOCCtxNWVXociiGOBRCx0mOEIBPsCJ/f5gmtUADtFxuCxcWoZiBSxC8tuy7GSdb142hMz18LiEvmvbcyGDvZ4mndHtTKafGNE3yLGvvc1zTGc9o9I8Z4b4xjvZN6e5mciK3JAHxVKdUVFi1Rv/XpUKZZ/98G1obxR7X1B1og= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IMI+t0Vg; 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="IMI+t0Vg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8FCFC4CED6; Thu, 27 Feb 2025 02:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622115; bh=BAHIbahU+lsfJf/CdjHqjuS4uLDTlzy9VzCRQ+JYTO8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IMI+t0Vg7ZSTbjPfX+AspX5zrJF/i/yF51Ue3rtNCE992o+LiXJi8c9jQc12cH3O+ mFmvqaf902Ycvl+SPeqQzCmFqdjLCfa6SuKBcYn6CtVrsGQjUmJGKg2WXDU7FLlMc5 4Sq2Ampy5ubakE5dh80QH0NCykjpWIYfSxJ195lk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57986: HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections Date: Wed, 26 Feb 2025 18:05:45 -0800 Message-ID: <2025022636-CVE-2024-57986-6166@gregkh> X-Mailer: git-send-email 2.48.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=3716; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BAHIbahU+lsfJf/CdjHqjuS4uLDTlzy9VzCRQ+JYTO8=; b=kA0DAAIRMUfUDdst+ykByyZiAGe/yHHIt539dcsZA/sJgSqpMQF4sJEu6jWLUfT2DBishExRc YhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAme/yHEACgkQMUfUDdst+ymUBACgiH86 KY4y3W4nD2/LX4v3NfQ4nTsAnRuLE82rhtB7ApawcvSdmaajfMjJ 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: HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections A report in 2019 by the syzbot fuzzer was found to be connected to two errors in the HID core associated with Resolution Multipliers. One of the errors was fixed by commit ea427a222d8b ("HID: core: Fix deadloop in hid_apply_multiplier."), but the other has not been fixed. This error arises because hid_apply_multipler() assumes that every Resolution Multiplier control is contained in a Logical Collection, i.e., there's no way the routine can ever set multiplier_collection to NULL. This is in spite of the fact that the function starts with a big comment saying: * "The Resolution Multiplier control must be contained in the same * Logical Collection as the control(s) to which it is to be applied. ... * If no Logical Collection is * defined, the Resolution Multiplier is associated with all * controls in the report." * HID Usage Table, v1.12, Section 4.3.1, p30 * * Thus, search from the current collection upwards until we find a * logical collection... The comment and the code overlook the possibility that none of the collections found may be a Logical Collection. The fix is to set the multiplier_collection pointer to NULL if the collection found isn't a Logical Collection. The Linux kernel CVE team has assigned CVE-2024-57986 to this issue. Affected and fixed versions =========================== Issue introduced in 5.0 with commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc and fixed in 6.1.129 with commit bebf542e8d7c44a18a95f306b1b5dc160c823506 Issue introduced in 5.0 with commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc and fixed in 6.6.76 with commit ed3d3883476423f337aac0f22c521819b3f1e970 Issue introduced in 5.0 with commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc and fixed in 6.12.13 with commit ebaeca33d32c8bdb705a8c88267737a456f354b1 Issue introduced in 5.0 with commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc and fixed in 6.13.2 with commit a5498f1f864ea26f4c613c77f54409c776a95a90 Issue introduced in 5.0 with commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc and fixed in 6.14-rc1 with commit 64f2657b579343cf923aa933f08074e6258eb07b 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-57986 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/hid/hid-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/bebf542e8d7c44a18a95f306b1b5dc160c823506 https://git.kernel.org/stable/c/ed3d3883476423f337aac0f22c521819b3f1e970 https://git.kernel.org/stable/c/ebaeca33d32c8bdb705a8c88267737a456f354b1 https://git.kernel.org/stable/c/a5498f1f864ea26f4c613c77f54409c776a95a90 https://git.kernel.org/stable/c/64f2657b579343cf923aa933f08074e6258eb07b