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 771EB3C9425 for ; Fri, 3 Apr 2026 15:27:16 +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=1775230036; cv=none; b=qiyKddfB/gon8e78bvPN572GAxklbne5EZAebgSoF9XBXQgrH2h9wjXoZMsDSo2MQDLPLroai2QIu1GAOksLvTeeKGlZU4ECj9oUu1axm06bz7a9WcPJK7QNxKAL54iq6Nd/aiodw+6VrXIdnHPu+Qciwi+zzxUDnEmkRdvEi7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230036; c=relaxed/simple; bh=gm8fiCzmzcNa40061sxPupvubSqTOcUKXVQr/lTp2fI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LsZioW72fKznxfwUAVAIni7UOGLLc9kYdSwePqe5MMNmR5imuU5QJkLrxAMNC6idLZwVPhxVnW3h5gjX2qXLDLSOS/r0Ih8jO7E2TIMdR+9Lfucri0ZzUz27PxIe5PQZN/lfbEbyod04eGbZLOzX8/u3t8x3YO8BharpQYaoKAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RdSbdMJZ; 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="RdSbdMJZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABA85C4CEF7; Fri, 3 Apr 2026 15:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775230036; bh=gm8fiCzmzcNa40061sxPupvubSqTOcUKXVQr/lTp2fI=; h=From:To:Cc:Subject:Date:Reply-To:From; b=RdSbdMJZGWaqUE0k9/ol45KxaZdMK4HWNu9DPLOFQxyDRYx6aedQppfSumAoWaySV nR4VcsFC0VLkZvumogttjq1Xe9lcEdlJ7sHJBMZPYKH/Rs4hFYFcVM/0kSr2VK8dLe KRsEiPndwaoRVtCH/0h151Z9T+oOPNrOJKEQRuJ8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31401: HID: bpf: prevent buffer overflow in hid_hw_request Date: Fri, 3 Apr 2026 17:19:09 +0200 Message-ID: <2026040327-CVE-2026-31401-697d@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2519; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6hRj6K5UFgMrR4bss3hoh+fUMH8o9XUlW47nVukpmMc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnnbznbn2XhCXu6Rr5/VWjCk2tlbK8/LvTK3Zu6OMTvZ Xf3gj3fO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiycEM86sP/p6caFjMHTx7 4Wpfq7u74h1s9RgWzC9YqLvS9L/3xLjEV9ER8RMOVKdxAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: HID: bpf: prevent buffer overflow in hid_hw_request right now the returned value is considered to be always valid. However, when playing with HID-BPF, the return value can be arbitrary big, because it's the return value of dispatch_hid_bpf_raw_requests(), which calls the struct_ops and we have no guarantees that the value makes sense. The Linux kernel CVE team has assigned CVE-2026-31401 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 and fixed in 6.12.78 with commit d6efaa50af62fb0790dd1fd4e7e5506b46312510 Issue introduced in 6.11 with commit 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 and fixed in 6.18.20 with commit 73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1 Issue introduced in 6.11 with commit 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 and fixed in 6.19.10 with commit eb57dae20fdf6f3069cdc07821fa3bb46de381d7 Issue introduced in 6.11 with commit 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 and fixed in 7.0-rc5 with commit 2b658c1c442ec1cd9eec5ead98d68662c40fe645 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-2026-31401 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/bpf/hid_bpf_dispatch.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/d6efaa50af62fb0790dd1fd4e7e5506b46312510 https://git.kernel.org/stable/c/73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1 https://git.kernel.org/stable/c/eb57dae20fdf6f3069cdc07821fa3bb46de381d7 https://git.kernel.org/stable/c/2b658c1c442ec1cd9eec5ead98d68662c40fe645