CVE-2025-38335

Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT

No CVSS score yet EPSS 0.15%

Published 10 Jul 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2025-38335

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38335 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT

When enabling PREEMPT_RT, the gpio_keys_irq_timer() callback runs in hard irq context, but the input_event() takes a spin_lock, which isn't allowed there as it is converted to a rt_spin_lock().

[ 4054.289999] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [ 4054.290028] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/0 ... [ 4054.290195] __might_resched+0x13c/0x1f4 [ 4054.290209] rt_spin_lock+0x54/0x11c [ 4054.290219] input_event+0x48/0x80 [ 4054.290230] gpio_keys_irq_timer+0x4c/0x78 [ 4054.290243] __hrtimer_run_queues+0x1a4/0x438 [ 4054.290257] hrtimer_interrupt+0xe4/0x240 [ 4054.290269] arch_timer_handler_phys+0x2c/0x44 [ 4054.290283] handle_percpu_devid_irq+0x8c/0x14c [ 4054.290297] handle_irq_desc+0x40/0x58 [ 4054.290307] generic_handle_domain_irq+0x1c/0x28 [ 4054.290316] gic_handle_irq+0x44/0xcc

Considering the gpio_keys_irq_isr() can run in any context, e.g. it can be threaded, it seems there's no point in requesting the timer isr to run in hard irq context.

Relax the hrtimer not to use the hard context.

Exploitation

EPSS 0.15%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 4.19% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before 664e5a6f541ff226621487d1280d2ec28e86be28
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before a8f01e51109f77229e426b57c5d19251b462c6aa
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before fa53beab4740c4e5fe969f218a379f9558be33dc
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before a7b79db25846459de63ca8974268f0c41c734c4b
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before ec8f5da79b425deef5aebacdd4fe645620cd4f0b
affected from 019002f20cb5b9f78d39360aff244265d035e08a, before f4a8f561d08e39f7833d4a278ebfb12a41eef15f
Other versions: unaffected
Linux
affected 5.13
unaffected before 5.13
unaffected from 5.15.190 up to and including 5.15.*
unaffected from 6.1.148 up to and including 6.1.*
unaffected from 6.6.101 up to and including 6.6.*
unaffected from 6.12.41 up to and including 6.12.*
unaffected from 6.15.4 up to and including 6.15.*
unaffected 6.16 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38335 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38335

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-38335
trivy image --scanners vuln IMAGE | grep CVE-2025-38335

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-38335 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.