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 E58802727FC; Sun, 1 Mar 2026 01:59:46 +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=1772330387; cv=none; b=IhRH7pUbbiIxeJ3SIZvOL2EN5BohzqS+naJ8lWkMybTSa2A1b998E1tvhVSmlx5XayusQCQ4onM0apmdZRVJC/UtydUU1sIt8ngXJHtjCLNxJl9kCwAkUUPtykiOLuEHxF7qnmaaOsWxpGj8uy7g5ZScMcSjmM4GJheEHIbltPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330387; c=relaxed/simple; bh=90FcIs+NjDarGkcvLFbKykf5R+MjETlOlp1l15GHMSQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dMTGaT92PHZ8mzi0ovQLyC2jYTOezPQ0/k+XOzTV0Vu+439JrW+iPw6CfyCNsvM5dPigttybYYAZK4jKt93NSENHhdwThfkMkvNkDm2DgWXaoWvlod1dIrytT1lSIARQxRkEnxg91GCrYEtl88whgbE2jj66PVqyBBaVW2lDkHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mq6pURcR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mq6pURcR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54706C2BC86; Sun, 1 Mar 2026 01:59:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772330386; bh=90FcIs+NjDarGkcvLFbKykf5R+MjETlOlp1l15GHMSQ=; h=From:To:Cc:Subject:Date:From; b=Mq6pURcRPH16aTlgfeyPEuF/5j4TJFHtIJljDPi2VEDkqq4HG23+NMTexwnIDyM26 UM/yrqCtCcaoICCvCSx53MY/sRzmfFRI79WcQmW8e6fdNrNnOFq0242HBR3q6Sd6cz h0bsoGxVy/UBsTNMXSg1rRolOgtMgzzj1FfQRqOIJkq7FmStwmEXx5k/EXnKKuIB6F 1/unpegrtmZ5/cibi0o/nxWDVReo7A3Ax7p6S5yxs3d3maxbP1W2MROdya5MqFQBuj EIunGcWqZJ6SmV6IeZWA/KrQL8AROESEB1Qi6yNgeKhSNH31YygBdDTc/G4rz/y2cL Xn6ik6aPtL35Q== From: Sasha Levin To: stable@vger.kernel.org, gnoack@google.com Cc: Jiri Kosina , linux-input@vger.kernel.org Subject: FAILED: Patch "HID: prodikeys: Check presence of pm->input_ep82" failed to apply to 5.10-stable tree Date: Sat, 28 Feb 2026 20:59:44 -0500 Message-ID: <20260301015945.1725609-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From cee8337e1bad168136aecfe6416ecd7d3aa7529a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Noack?= Date: Fri, 9 Jan 2026 11:58:08 +0100 Subject: [PATCH] HID: prodikeys: Check presence of pm->input_ep82 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fake USB devices can send their own report descriptors for which the input_mapping() hook does not get called. In this case, pm->input_ep82 stays NULL, which leads to a crash later. This does not happen with the real device, but can be provoked by imposing as one. Cc: stable@vger.kernel.org Signed-off-by: Günther Noack Signed-off-by: Jiri Kosina --- drivers/hid/hid-prodikeys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 74bddb2c3e82e..6e413df38358a 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -378,6 +378,10 @@ static int pcmidi_handle_report4(struct pcmidi_snd *pm, u8 *data) bit_mask = (bit_mask << 8) | data[2]; bit_mask = (bit_mask << 8) | data[3]; + /* robustness in case input_mapping hook does not get called */ + if (!pm->input_ep82) + return 0; + /* break keys */ for (bit_index = 0; bit_index < 24; bit_index++) { if (!((0x01 << bit_index) & bit_mask)) { -- 2.51.0