CVE-2022-49322

5.5 MEDIUM

📋 TL;DR

This CVE describes a race condition vulnerability in the Linux kernel's tracing subsystem when using PREEMPT_RT (real-time) kernels with specific boot parameters. The vulnerability causes a sleeping function to be called from an invalid atomic context, potentially leading to kernel instability or crashes. It primarily affects systems running PREEMPT_RT kernels with specific tracing configurations enabled.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Linux kernel versions before the fix (specific versions not explicitly stated, but references indicate fixes in stable kernel trees)
Operating Systems: Linux distributions using PREEMPT_RT kernels
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when: 1) Using PREEMPT_RT kernel, 2) Boot parameters include 'trace_event=initcall:initcall_start tp_printk=1'

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic or system crash leading to denial of service, potentially disrupting critical real-time operations on affected systems.

🟠

Likely Case

System instability, kernel warnings, or crashes when the specific tracing configuration is enabled on PREEMPT_RT kernels.

🟢

If Mitigated

No impact if the vulnerable configuration is not used or if systems are not running PREEMPT_RT kernels.

🌐 Internet-Facing: LOW - This is a local kernel vulnerability requiring specific kernel configuration and boot parameters.
🏢 Internal Only: MEDIUM - Could affect internal systems running PREEMPT_RT kernels with the vulnerable configuration, potentially disrupting real-time operations.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

This appears to be a stability bug rather than a security vulnerability that enables privilege escalation or remote access. Exploitation would require local access and specific kernel configuration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in Linux kernel stable releases (commits referenced in CVE)

Vendor Advisory: https://git.kernel.org/stable/c/12025abdc8539ed9d5014e2d647a3fd1bd3de5cd

Restart Required: Yes

Instructions:

1. Update Linux kernel to a version containing the fix. 2. Check kernel commit history for inclusion of fixes. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable vulnerable tracing configuration

linux

Remove the problematic boot parameters that trigger the vulnerability

Edit /etc/default/grub or bootloader configuration
Remove: trace_event=initcall:initcall_start tp_printk=1
Run: update-grub (or equivalent)
Reboot system

🧯 If You Can't Patch

  • Avoid using 'trace_event=initcall:initcall_start tp_printk=1' boot parameters
  • Consider using standard kernel instead of PREEMPT_RT if real-time features are not required

🔍 How to Verify

Check if Vulnerable:

Check if running PREEMPT_RT kernel: 'uname -a | grep -i rt' and check boot parameters: 'cat /proc/cmdline | grep trace_event'

Check Version:

uname -r

Verify Fix Applied:

Check kernel version against patched versions in git commits, verify boot parameters don't include vulnerable configuration

📡 Detection & Monitoring

Log Indicators:

  • Kernel messages about 'sleeping function called from invalid context'
  • BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46
  • System crashes or instability when specific tracing is enabled

Network Indicators:

  • None - this is a local kernel issue

SIEM Query:

source="kernel" AND "sleeping function called from invalid context" AND "spinlock_rt.c"

🔗 References

📤 Share & Export