{"id":"CVE-2022-49322","aliases":["CVE-2022-49322"],"related":[],"kind":"vulnerability","state":"published","title":"tracing: Fix sleeping function called from invalid context on RT kernel","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Fix sleeping function called from invalid context on RT kernel\n\nWhen setting bootparams=\"trace_event=initcall:initcall_start tp_printk=1\" in the\ncmdline, the output_printk() was called, and the spin_lock_irqsave() was called in the\natomic and irq disable interrupt context suitation. On the PREEMPT_RT kernel,\nthese locks are replaced with sleepable rt-spinlock, so the stack calltrace will\nbe triggered.\nFix it by raw_spin_lock_irqsave when PREEMPT_RT and \"trace_event=initcall:initcall_start\ntp_printk=1\" enabled.\n\n BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46\n in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0\n preempt_count: 2, expected: 0\n RCU nest depth: 0, expected: 0\n Preemption disabled at:\n [<ffffffff8992303e>] try_to_wake_up+0x7e/0xba0\n CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7\n Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014\n Call Trace:\n  <TASK>\n  dump_stack_lvl+0x60/0x8c\n  dump_stack+0x10/0x12\n  __might_resched.cold+0x11d/0x155\n  rt_spin_lock+0x40/0x70\n  trace_event_buffer_commit+0x2fa/0x4c0\n  ? map_vsyscall+0x93/0x93\n  trace_event_raw_event_initcall_start+0xbe/0x110\n  ? perf_trace_initcall_finish+0x210/0x210\n  ? probe_sched_wakeup+0x34/0x40\n  ? ttwu_do_wakeup+0xda/0x310\n  ? trace_hardirqs_on+0x35/0x170\n  ? map_vsyscall+0x93/0x93\n  do_one_initcall+0x217/0x3c0\n  ? trace_event_raw_event_initcall_level+0x170/0x170\n  ? push_cpu_stop+0x400/0x400\n  ? cblist_init_generic+0x241/0x290\n  kernel_init_freeable+0x1ac/0x347\n  ? _raw_spin_unlock_irq+0x65/0x80\n  ? rest_init+0xf0/0xf0\n  kernel_init+0x1e/0x150\n  ret_from_fork+0x22/0x30\n  </TASK>","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Fix sleeping function called from invalid context on RT kernel\n\nWhen setting bootparams=\"trace_event=initcall:initcall_start tp_printk=1\" in the\ncmdline, the output_printk() was called, and the spin_lock_irqsave() was called in the\natomic and irq disable interrupt context suitation. On the PREEMPT_RT kernel,\nthese locks are replaced with sleepable rt-spinlock, so the stack calltrace will\nbe triggered.\nFix it by raw_spin_lock_irqsave when PREEMPT_RT and \"trace_event=initcall:initcall_start\ntp_printk=1\" enabled.\n\n BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46\n in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0\n preempt_count: 2, expected: 0\n RCU nest depth: 0, expected: 0\n Preemption disabled at:\n [<ffffffff8992303e>] try_to_wake_up+0x7e/0xba0\n CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7\n Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014\n Call Trace:\n  <TASK>\n  dump_stack_lvl+0x60/0x8c\n  dump_stack+0x10/0x12\n  __might_resched.cold+0x11d/0x155\n  rt_spin_lock+0x40/0x70\n  trace_event_buffer_commit+0x2fa/0x4c0\n  ? map_vsyscall+0x93/0x93\n  trace_event_raw_event_initcall_start+0xbe/0x110\n  ? perf_trace_initcall_finish+0x210/0x210\n  ? probe_sched_wakeup+0x34/0x40\n  ? ttwu_do_wakeup+0xda/0x310\n  ? trace_hardirqs_on+0x35/0x170\n  ? map_vsyscall+0x93/0x93\n  do_one_initcall+0x217/0x3c0\n  ? trace_event_raw_event_initcall_level+0x170/0x170\n  ? push_cpu_stop+0x400/0x400\n  ? cblist_init_generic+0x241/0x290\n  kernel_init_freeable+0x1ac/0x347\n  ? _raw_spin_unlock_irq+0x65/0x80\n  ? rest_init+0xf0/0xf0\n  kernel_init+0x1e/0x150\n  ret_from_fork+0x22/0x30\n  </TASK>","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Seguimiento: se corrige la función inactiva llamada desde un contexto no válido en el kernel RT Al configurar bootparams=\"trace_event=initcall:initcall_start tp_printk=1\" en la línea de comandos, se llamó a output_printk() y a spin_lock_irqsave() en la adecuación del contexto de interrupción atómica y deshabilitada de irq. En el kernel PREEMPT_RT, estos bloqueos se reemplazan con rt-spinlock sleepable, por lo que se activará la llamada de pila trace. Corríjalo con raw_spin_lock_irqsave cuando PREEMPT_RT y \"trace_event=initcall:initcall_start tp_printk=1\" estén habilitados. ERROR: función de suspensión llamada desde un contexto no válido en kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 2, expected: 0 Profundidad de anidamiento de RCU: 0, expected: 0 Preempción deshabilitada en: [] try_to_wake_up+0x7e/0xba0 CPU: 0 PID: 1 Comm: swapper/0 No contaminado 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7 Nombre del hardware: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 01/04/2014 Seguimiento de llamadas:  dump_stack_lvl+0x60/0x8c dump_stack+0x10/0x12 __might_resched.cold+0x11d/0x155 rt_spin_lock+0x40/0x70 trace_event_buffer_commit+0x2fa/0x4c0 ? map_vsyscall+0x93/0x93 trace_event_raw_event_initcall_start+0xbe/0x110 ? perf_trace_initcall_finish+0x210/0x210 ? probe_sched_wakeup+0x34/0x40 ? ttwu_do_wakeup+0xda/0x310 ? trace_hardirqs_on+0x35/0x170 ? map_vsyscall+0x93/0x93 do_one_initcall+0x217/0x3c0 ? trace_event_raw_event_initcall_level+0x170/0x170 ? push_cpu_stop+0x400/0x400 ? cblist_init_generic+0x241/0x290 kernel_init_freeable+0x1ac/0x347 ? _raw_spin_unlock_irq+0x65/0x80 ? rest_init+0xf0/0xf0 kernel_init+0x1e/0x150 ret_from_fork+0x22/0x30","source":"nvd"}],"published":"2025-02-26T02:10:46.658Z","modified":"2026-06-17T05:17:42.783Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"be1f323fb9d9b14a505ca22d742d321769454de1","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"40f9fde06b25884baa0c4bd138b909a9b67218b4","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"48c6ee7d6c614f09b2c8553a95eefef6ecf196e0","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"1788e6dbb61286215442b1af99e51405a6206762","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"9b534640a2c6a8d88168febc82ec6d161184f2ec","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"43bfc4dccc416c964b53cbdc430e814f8b6f770b","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"9abf3db8bdb63ab545034148ef2118f4d088ca59","status":"affected"},{"type":"git","introduced":"0daa2302968c13b657118d6ac92471f8fd2f3f28","fixed":"12025abdc8539ed9d5014e2d647a3fd1bd3de5cd","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.19","status":"unaffected"},{"type":"semver","introduced":"4.14.283","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.247","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.198","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.122","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.47","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.17.15","lastAffected":"5.17.*","status":"unaffected"},{"type":"semver","introduced":"5.18.4","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.14.283"},{"status":"affected","introduced":"4.15","fixed":"4.19.247"},{"status":"affected","introduced":"4.20","fixed":"5.4.198"},{"status":"affected","introduced":"5.5","fixed":"5.10.122"},{"status":"affected","introduced":"5.11","fixed":"5.15.47"},{"status":"affected","introduced":"5.16","fixed":"5.17.15"},{"status":"affected","introduced":"5.18","fixed":"5.18.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/be1f323fb9d9b14a505ca22d742d321769454de1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40f9fde06b25884baa0c4bd138b909a9b67218b4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48c6ee7d6c614f09b2c8553a95eefef6ecf196e0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1788e6dbb61286215442b1af99e51405a6206762","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9b534640a2c6a8d88168febc82ec6d161184f2ec","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/43bfc4dccc416c964b53cbdc430e814f8b6f770b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9abf3db8bdb63ab545034148ef2118f4d088ca59","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/12025abdc8539ed9d5014e2d647a3fd1bd3de5cd","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:43:41.615Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49322","url":"https://www.cve.org/CVERecord?id=CVE-2022-49322","licence":"CVE Terms of Use","modified":"2026-05-11T18:57:27.338Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49322","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49322","licence":"Public domain","modified":"2026-06-17T05:17:42.783Z"}],"updatedAt":"2026-11-25T22:58:20.403Z","epss":{"score":0.00215,"percentile":0.12718,"date":"2026-12-01T12:00:22.000Z"}}