Cloudanix VulnDB

CVE-2026-90338

None

CVSS

—

EPSS

0.2%

Published

Sep 17, 2026

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in certain Linux systems with real-time features can cause crashes when the console tries to print messages at critical times.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Race Condition
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability causes clk_enable() to be invoked from atomic/NMI context in pl011_console_write_atomic() on PREEMPT_RT kernels, violating sleeping lock rules and triggering a kernel BUG due to contention on the common-clock enable_lock.

Why it matters to the business

Systems running real-time Linux on affected Arm hardware may experience unexpected kernel crashes during console output, leading to downtime or instability in embedded and industrial deployments.

How an attack unfolds

System activity or logging triggers vprintk_emit from atomic context, which calls the atomic console write path; on clock-backed pl011 hardware this acquires a potentially sleeping lock, causing the invalid-context BUG.

How to fix it

Upgrade to a kernel containing the fix that calls clk_prepare_enable once in pl011_console_setup and clk_disable_unprepare in the exit callback, removing per-write clock toggling from write_atomic and write_thread paths.

How to confirm the fix worked

Inspect the amba-pl011 driver source for removal of clk_enable/clk_disable pairs around pl011_console_write_atomic and presence of permanent clock enable in console setup; boot with PREEMPT_RT and verify absence of the sleeping-function BUG on console activity.

Typical attack path

  1. Trigger atomic-context printk or NMI logging on PREEMPT_RT kernel
  2. pl011_console_write_atomic executes clk_enable()
  3. clk_enable_lock falls back to sleeping spin_lock under contention
  4. Kernel hits BUG in rt_spin_lock and panics

How to detect it

Search kernel logs for BUG messages referencing sleeping function called from invalid context at spinlock_rt.c combined with clk_enable_lock or pl011_console_write_atomic stack frames; examine dmesg and serial console output around the time of any RT kernel panics.

  • BUG: sleeping function called from invalid context at spinlock_rt.c:48
  • rt_spin_lock from clk_enable_lock
  • clk_enable from pl011_console_write_atomic
  • __might_resched from rt_spin_lock

What your security team should do

  • Identify all Arm DT-based systems running PREEMPT_RT kernels and schedule kernel upgrades
  • Test console behavior under load after applying the fix to confirm clock remains enabled without per-write calls
  • Monitor for similar atomic-context clock usage patterns in other serial drivers

The record

In the Linux kernel, the following vulnerability has been resolved: serial: amba-pl011: keep console clock enabled for atomic writes pl011_console_write_atomic() runs from nbcon atomic context, where sleeping is not allowed. It calls clk_enable(), which takes the common-clk enable_lock. Under PREEMPT_RT that is a sleeping lock: clk_enable_lock() first tries spin_trylock_irqsave(), but on contention falls back to spin_lock_irqsave(). Therefore, an atomic-context printk on an RT kernel with a clk-backed pl011 can trip: BUG: sleeping function called from invalid context at spinlock_rt.c:48 __might_resched from rt_spin_lock rt_spin_lock from clk_enable_lock clk_enable_lock from clk_enable clk_enable from pl011_console_write_atomic ... from vprintk_emit This was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are affected; arm64 SBSA/ACPI has no clk, so clk_enable(NULL) short-circuits before the lock. In addition, write_atomic() may be invoked from NMI context and is documented to avoid locking. Removing clk_enable() from the callback also avoids a potentially unsafe NMI acquisition of the common-clock enable_lock. An nbcon atomic-capable console must be printable from any context, so the clock cannot be gated between writes. Enable the clock while the console is available for output: use clk_prepare_enable() in pl011_console_setup(), release it via clk_disable_unprepare() in the console .exit() callback, and drop the per-write clk_enable()/clk_disable() pairs from write_atomic() and write_thread(). When printk suspends consoles, drop the reference after uart_suspend_port() stops console access and restore it before uart_resume_port() -- but only if suspend actually marked the port suspended (a wake-capable tty stays running and must keep its clock), and keep it when console_suspend_enabled is false so no_console_suspend works. The active power cost of keeping the clock enabled is platform-dependent: none where the UART clock is a fixed always-on oscillator, real where it is a gateable clock branch, which then cannot be gated (nor possibly can its parent clocks) while the console is available for output. When serial core actually suspends the port, the reference is released so the clock provider can gate the clock tree.

Affected packages

Ecosystem Package Introduced Fixed