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 1B59230DD11; Sun, 1 Mar 2026 01:49:26 +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=1772329767; cv=none; b=shMtHt8HuKxNgxmxqzu/vwm95xqbUsasK3nIxY1YSx8R+GMbVJughEDQ1ZHmeLUCLN/+RjC2T1NXhCDPGJy/SEriKFE1G8+7jM5AfnxyH3K4l7UR9kBGtFkctNqVl8gyozmM+jtzROLOXnwA0ehW6bCGs2qNAJ8MCV/qI+k+ZkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772329767; c=relaxed/simple; bh=09uOv6m99m9KmJzsnA3GF9/0PhFtS8mgwsJlqW2aozo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=F/UH2ugjhvJB3kN/xjHdwGA/3MOtViWvMS/XKlH7I5JKpz43j3XbZ3IRMVRzrLfyJnZ7D0DpnIpVv0p1d1+dAgCmIbdSe/MqC8+oiPWN7GpDaJ5hBD5r/T6O05E2WuzDAAziNirpz7uUYL25PUxqutHQq2iC3jKk0hTMR2h//Tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EvLZVuXP; 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="EvLZVuXP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CDF8C19421; Sun, 1 Mar 2026 01:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772329766; bh=09uOv6m99m9KmJzsnA3GF9/0PhFtS8mgwsJlqW2aozo=; h=From:To:Cc:Subject:Date:From; b=EvLZVuXPPRxdvYiG+Azsg2AhsysCgzSXVf+kne3umVs0hP9l0vH7qHAx/9HS/EEL4 H4G6FRFlvUxa9ATOzgfKSfKIqUeIAc15wXymsofbfNEAxH3W0fJsQLYYP/eBQ1fnvU cNoct+cEHHsVRADZwI09w/BPNKUWYTEbR5xly7T8LDnWyaUHHt5V5Yk2vHgQT8IqOl K1VdSQ+nsJ0hXbnWYW+Kauc6XfA/2Jq6dUeHi5e8c0kKU3POzI3BgNmJbE4ayzvq0G o4Z+IrxVQZFL3qRLNPFt03itRtHS3Kuu4Zq9NBEsCW2qZfMfw1DXNS1zTDV0c171FY 61GLxcasXCjTg== 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.15-stable tree Date: Sat, 28 Feb 2026 20:49:24 -0500 Message-ID: <20260301014925.1713902-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.15-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