CVE-2022-49322

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
26/02/2025
Last modified:
01/10/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> tracing: Fix sleeping function called from invalid context on RT kernel<br /> <br /> When setting bootparams="trace_event=initcall:initcall_start tp_printk=1" in the<br /> cmdline, the output_printk() was called, and the spin_lock_irqsave() was called in the<br /> atomic and irq disable interrupt context suitation. On the PREEMPT_RT kernel,<br /> these locks are replaced with sleepable rt-spinlock, so the stack calltrace will<br /> be triggered.<br /> Fix it by raw_spin_lock_irqsave when PREEMPT_RT and "trace_event=initcall:initcall_start<br /> tp_printk=1" enabled.<br /> <br /> BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46<br /> in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0<br /> preempt_count: 2, expected: 0<br /> RCU nest depth: 0, expected: 0<br /> Preemption disabled at:<br /> [] try_to_wake_up+0x7e/0xba0<br /> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7<br /> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014<br /> Call Trace:<br /> <br /> dump_stack_lvl+0x60/0x8c<br /> dump_stack+0x10/0x12<br /> __might_resched.cold+0x11d/0x155<br /> rt_spin_lock+0x40/0x70<br /> trace_event_buffer_commit+0x2fa/0x4c0<br /> ? map_vsyscall+0x93/0x93<br /> trace_event_raw_event_initcall_start+0xbe/0x110<br /> ? perf_trace_initcall_finish+0x210/0x210<br /> ? probe_sched_wakeup+0x34/0x40<br /> ? ttwu_do_wakeup+0xda/0x310<br /> ? trace_hardirqs_on+0x35/0x170<br /> ? map_vsyscall+0x93/0x93<br /> do_one_initcall+0x217/0x3c0<br /> ? trace_event_raw_event_initcall_level+0x170/0x170<br /> ? push_cpu_stop+0x400/0x400<br /> ? cblist_init_generic+0x241/0x290<br /> kernel_init_freeable+0x1ac/0x347<br /> ? _raw_spin_unlock_irq+0x65/0x80<br /> ? rest_init+0xf0/0xf0<br /> kernel_init+0x1e/0x150<br /> ret_from_fork+0x22/0x30<br />

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.14.283 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (including) 4.19.247 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.198 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.122 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.47 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.17.15 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.18 (including) 5.18.4 (excluding)