{"id":25747,"date":"2026-09-18T04:31:50","date_gmt":"2026-09-17T20:31:50","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-90338"},"modified":"2026-09-18T04:31:50","modified_gmt":"2026-09-17T20:31:50","slug":"cve-2026-90338","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-90338","title":{"rendered":"CVE-2026-90338 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nserial: amba-pl011: k"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>serial: amba-pl011: keep console clock enabled for atomic writes<\/p>\n<p>pl011_console_write_atomic() runs from nbcon atomic context, where<br \/>\nsleeping is not allowed. It calls clk_enable(), which takes the common-clk<br \/>\nenable_lock. Under PREEMPT_RT that is a sleeping lock:<br \/>\nclk_enable_lock() first tries spin_trylock_irqsave(), but on contention<br \/>\nfalls back to spin_lock_irqsave(). Therefore, an atomic-context printk on<br \/>\nan RT kernel with a clk-backed pl011 can trip:<\/p>\n<p>  BUG: sleeping function called from invalid context at spinlock_rt.c:48<br \/>\n    __might_resched from rt_spin_lock<br \/>\n    rt_spin_lock from clk_enable_lock<br \/>\n    clk_enable_lock from clk_enable<br \/>\n    clk_enable from pl011_console_write_atomic<br \/>\n    &#8230; from vprintk_emit<\/p>\n<p>This was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are<br \/>\naffected; arm64 SBSA\/ACPI has no clk, so clk_enable(NULL) short-circuits<br \/>\nbefore the lock. In addition, write_atomic() may be invoked from NMI<br \/>\ncontext and is documented to avoid locking. Removing clk_enable() from<br \/>\nthe callback also avoids a potentially unsafe NMI acquisition of the<br \/>\ncommon-clock enable_lock.<\/p>\n<p>An nbcon atomic-capable console must be printable from any context, so<br \/>\nthe clock cannot be gated between writes. Enable the clock while the<br \/>\nconsole is available for output: use clk_prepare_enable() in<br \/>\npl011_console_setup(), release it via clk_disable_unprepare() in the<br \/>\nconsole .exit() callback, and drop the per-write clk_enable()\/clk_disable()<br \/>\npairs from write_atomic() and write_thread().<\/p>\n<p>When printk suspends consoles, drop the reference after<br \/>\nuart_suspend_port() stops console access and restore it before<br \/>\nuart_resume_port() &#8212; but only if suspend actually marked the port<br \/>\nsuspended (a wake-capable tty stays running and must keep its clock), and<br \/>\nkeep it when console_suspend_enabled is false so no_console_suspend works.<\/p>\n<p>The active power cost of keeping the clock enabled is platform-dependent:<br \/>\nnone where the UART clock is a fixed always-on oscillator, real where it<br \/>\nis a gateable clock branch, which then cannot be gated (nor possibly can<br \/>\nits parent clocks) while the console is available for output. When serial<br \/>\ncore actually suspends the port, the reference is released so the clock<br \/>\nprovider can gate the clock tree.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>serial: amba-pl011: keep console clock enabled for atomic writes<\/p>\n<p>pl011_console_write_atomic() runs from nbcon atomic context, wher<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-25747","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/25747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}