In the Linux kernel, the following vulnerability has been resolved:
Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT
When enabling PREEMPTRT, the gpiokeysirqtimer() callback runs in hard irq context, but the inputevent() takes a spinlock, which isn't allowed there as it is converted to a rtspinlock().
[ 4054.289999] BUG: sleeping function called from invalid context at kernel/locking/spinlockrt.c:48 [ 4054.290028] inatomic(): 1, irqsdisabled(): 1, nonblock: 0, pid: 0, name: swapper/0 ... [ 4054.290195] _mightresched+0x13c/0x1f4 [ 4054.290209] rtspinlock+0x54/0x11c [ 4054.290219] inputevent+0x48/0x80 [ 4054.290230] gpiokeysirqtimer+0x4c/0x78 [ 4054.290243] _hrtimerrunqueues+0x1a4/0x438 [ 4054.290257] hrtimerinterrupt+0xe4/0x240 [ 4054.290269] archtimerhandlerphys+0x2c/0x44 [ 4054.290283] handlepercpudevidirq+0x8c/0x14c [ 4054.290297] handleirqdesc+0x40/0x58 [ 4054.290307] generichandledomainirq+0x1c/0x28 [ 4054.290316] gichandle_irq+0x44/0xcc
Considering the gpiokeysirq_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.
[
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"260047891279811012066101860921197622484",
"190617237049605714112296258896934334355",
"173993508663752401047899527857317212655",
"220511714986702447347328869809502413487",
"264792509169067921860643623316040548490",
"194829450330436772652534605839798541523",
"7555921522387943465143397058953895420",
"335849493303949587431429004651412225092"
]
},
"signature_type": "Line",
"id": "CVE-2025-38335-07b6d1b4",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec8f5da79b425deef5aebacdd4fe645620cd4f0b",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"260047891279811012066101860921197622484",
"190617237049605714112296258896934334355",
"308837012757805084864498704582251913193",
"127496580966985752179303861247336213580",
"394559185342333438664304798823555166",
"2805528411102919517429548248056452690",
"296216920002051197259445116972024596197",
"181876757858489039275851365638065069426"
]
},
"signature_type": "Line",
"id": "CVE-2025-38335-275cfdba",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8f01e51109f77229e426b57c5d19251b462c6aa",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 644.0,
"function_hash": "82498411740210309043962468536432943153"
},
"signature_type": "Function",
"id": "CVE-2025-38335-2c9ffc12",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_irq_isr"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec8f5da79b425deef5aebacdd4fe645620cd4f0b",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 644.0,
"function_hash": "82498411740210309043962468536432943153"
},
"signature_type": "Function",
"id": "CVE-2025-38335-35c4060d",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_irq_isr"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4a8f561d08e39f7833d4a278ebfb12a41eef15f",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 3537.0,
"function_hash": "169345318326389670682591449262751654748"
},
"signature_type": "Function",
"id": "CVE-2025-38335-3d96f72d",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_setup_key"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec8f5da79b425deef5aebacdd4fe645620cd4f0b",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 703.0,
"function_hash": "320136380016237332763400708136537206108"
},
"signature_type": "Function",
"id": "CVE-2025-38335-4ea6c7e4",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_irq_isr"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8f01e51109f77229e426b57c5d19251b462c6aa",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 685.0,
"function_hash": "3828322780863952596373431225468900947"
},
"signature_type": "Function",
"id": "CVE-2025-38335-919be7b9",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_irq_isr"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa53beab4740c4e5fe969f218a379f9558be33dc",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"260047891279811012066101860921197622484",
"190617237049605714112296258896934334355",
"173993508663752401047899527857317212655",
"220511714986702447347328869809502413487",
"264792509169067921860643623316040548490",
"194829450330436772652534605839798541523",
"7555921522387943465143397058953895420",
"335849493303949587431429004651412225092"
]
},
"signature_type": "Line",
"id": "CVE-2025-38335-bc6b2f87",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4a8f561d08e39f7833d4a278ebfb12a41eef15f",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 3197.0,
"function_hash": "129793753062178700231061102411536537462"
},
"signature_type": "Function",
"id": "CVE-2025-38335-c52a59e3",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_setup_key"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa53beab4740c4e5fe969f218a379f9558be33dc",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 3249.0,
"function_hash": "142276353685208571757793985364024819469"
},
"signature_type": "Function",
"id": "CVE-2025-38335-c700f243",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_setup_key"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8f01e51109f77229e426b57c5d19251b462c6aa",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 3537.0,
"function_hash": "169345318326389670682591449262751654748"
},
"signature_type": "Function",
"id": "CVE-2025-38335-d97dcf6b",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c",
"function": "gpio_keys_setup_key"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4a8f561d08e39f7833d4a278ebfb12a41eef15f",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"260047891279811012066101860921197622484",
"190617237049605714112296258896934334355",
"308837012757805084864498704582251913193",
"127496580966985752179303861247336213580",
"394559185342333438664304798823555166",
"2805528411102919517429548248056452690",
"296216920002051197259445116972024596197",
"181876757858489039275851365638065069426"
]
},
"signature_type": "Line",
"id": "CVE-2025-38335-e08b02ea",
"target": {
"file": "drivers/input/keyboard/gpio_keys.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa53beab4740c4e5fe969f218a379f9558be33dc",
"deprecated": false
}
]