{"api_version":"1","generated_at":"2026-09-18T00:39:20+00:00","cve":"CVE-2026-90338","urls":{"html":"https://cve.report/CVE-2026-90338","api":"https://cve.report/api/cve/CVE-2026-90338.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-90338","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-90338"},"summary":{"title":"serial: amba-pl011: keep console clock enabled for atomic writes","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: amba-pl011: keep console clock enabled for atomic writes\n\npl011_console_write_atomic() runs from nbcon atomic context, where\nsleeping is not allowed. It calls clk_enable(), which takes the common-clk\nenable_lock. Under PREEMPT_RT that is a sleeping lock:\nclk_enable_lock() first tries spin_trylock_irqsave(), but on contention\nfalls back to spin_lock_irqsave(). Therefore, an atomic-context printk on\nan RT kernel with a clk-backed pl011 can trip:\n\n  BUG: sleeping function called from invalid context at spinlock_rt.c:48\n    __might_resched from rt_spin_lock\n    rt_spin_lock from clk_enable_lock\n    clk_enable_lock from clk_enable\n    clk_enable from pl011_console_write_atomic\n    ... from vprintk_emit\n\nThis was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are\naffected; arm64 SBSA/ACPI has no clk, so clk_enable(NULL) short-circuits\nbefore the lock. In addition, write_atomic() may be invoked from NMI\ncontext and is documented to avoid locking. Removing clk_enable() from\nthe callback also avoids a potentially unsafe NMI acquisition of the\ncommon-clock enable_lock.\n\nAn nbcon atomic-capable console must be printable from any context, so\nthe clock cannot be gated between writes. Enable the clock while the\nconsole is available for output: use clk_prepare_enable() in\npl011_console_setup(), release it via clk_disable_unprepare() in the\nconsole .exit() callback, and drop the per-write clk_enable()/clk_disable()\npairs from write_atomic() and write_thread().\n\nWhen printk suspends consoles, drop the reference after\nuart_suspend_port() stops console access and restore it before\nuart_resume_port() -- but only if suspend actually marked the port\nsuspended (a wake-capable tty stays running and must keep its clock), and\nkeep it when console_suspend_enabled is false so no_console_suspend works.\n\nThe active power cost of keeping the clock enabled is platform-dependent:\nnone where the UART clock is a fixed always-on oscillator, real where it\nis a gateable clock branch, which then cannot be gated (nor possibly can\nits parent clocks) while the console is available for output. When serial\ncore actually suspends the port, the reference is released so the clock\nprovider can gate the clock tree.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-17 17:17:32","updated_at":"2026-09-17 17:17:32"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/2ad24c1d0b939d814a3020f96a667ac2d0394289","name":"https://git.kernel.org/stable/c/2ad24c1d0b939d814a3020f96a667ac2d0394289","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5b77848423f4a5a362dcc3caedcdc1a75d0758c3","name":"https://git.kernel.org/stable/c/5b77848423f4a5a362dcc3caedcdc1a75d0758c3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c0e8cfef754645856374e82c8effd54b7d82002b","name":"https://git.kernel.org/stable/c/c0e8cfef754645856374e82c8effd54b7d82002b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-90338","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90338","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2eb2608618ce5878e11bbe68cc8d2699c8f3a81a 5b77848423f4a5a362dcc3caedcdc1a75d0758c3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2eb2608618ce5878e11bbe68cc8d2699c8f3a81a 2ad24c1d0b939d814a3020f96a667ac2d0394289 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2eb2608618ce5878e11bbe68cc8d2699c8f3a81a c0e8cfef754645856374e82c8effd54b7d82002b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.15","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.15 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.52 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.6 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/tty/serial/amba-pl011.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"5b77848423f4a5a362dcc3caedcdc1a75d0758c3","status":"affected","version":"2eb2608618ce5878e11bbe68cc8d2699c8f3a81a","versionType":"git"},{"lessThan":"2ad24c1d0b939d814a3020f96a667ac2d0394289","status":"affected","version":"2eb2608618ce5878e11bbe68cc8d2699c8f3a81a","versionType":"git"},{"lessThan":"c0e8cfef754645856374e82c8effd54b7d82002b","status":"affected","version":"2eb2608618ce5878e11bbe68cc8d2699c8f3a81a","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/tty/serial/amba-pl011.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.15"},{"lessThan":"6.15","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.52","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.52","versionStartIncluding":"6.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.6","versionStartIncluding":"6.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","versionStartIncluding":"6.15","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: amba-pl011: keep console clock enabled for atomic writes\n\npl011_console_write_atomic() runs from nbcon atomic context, where\nsleeping is not allowed. It calls clk_enable(), which takes the common-clk\nenable_lock. Under PREEMPT_RT that is a sleeping lock:\nclk_enable_lock() first tries spin_trylock_irqsave(), but on contention\nfalls back to spin_lock_irqsave(). Therefore, an atomic-context printk on\nan RT kernel with a clk-backed pl011 can trip:\n\n  BUG: sleeping function called from invalid context at spinlock_rt.c:48\n    __might_resched from rt_spin_lock\n    rt_spin_lock from clk_enable_lock\n    clk_enable_lock from clk_enable\n    clk_enable from pl011_console_write_atomic\n    ... from vprintk_emit\n\nThis was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are\naffected; arm64 SBSA/ACPI has no clk, so clk_enable(NULL) short-circuits\nbefore the lock. In addition, write_atomic() may be invoked from NMI\ncontext and is documented to avoid locking. Removing clk_enable() from\nthe callback also avoids a potentially unsafe NMI acquisition of the\ncommon-clock enable_lock.\n\nAn nbcon atomic-capable console must be printable from any context, so\nthe clock cannot be gated between writes. Enable the clock while the\nconsole is available for output: use clk_prepare_enable() in\npl011_console_setup(), release it via clk_disable_unprepare() in the\nconsole .exit() callback, and drop the per-write clk_enable()/clk_disable()\npairs from write_atomic() and write_thread().\n\nWhen printk suspends consoles, drop the reference after\nuart_suspend_port() stops console access and restore it before\nuart_resume_port() -- but only if suspend actually marked the port\nsuspended (a wake-capable tty stays running and must keep its clock), and\nkeep it when console_suspend_enabled is false so no_console_suspend works.\n\nThe active power cost of keeping the clock enabled is platform-dependent:\nnone where the UART clock is a fixed always-on oscillator, real where it\nis a gateable clock branch, which then cannot be gated (nor possibly can\nits parent clocks) while the console is available for output. When serial\ncore actually suspends the port, the reference is released so the clock\nprovider can gate the clock tree."}],"providerMetadata":{"dateUpdated":"2026-09-17T16:08:50.331Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/5b77848423f4a5a362dcc3caedcdc1a75d0758c3"},{"url":"https://git.kernel.org/stable/c/2ad24c1d0b939d814a3020f96a667ac2d0394289"},{"url":"https://git.kernel.org/stable/c/c0e8cfef754645856374e82c8effd54b7d82002b"}],"title":"serial: amba-pl011: keep console clock enabled for atomic writes","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-90338","datePublished":"2026-09-17T16:08:50.331Z","dateReserved":"2026-09-11T19:38:34.804Z","dateUpdated":"2026-09-17T16:08:50.331Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-17 17:17:32","lastModifiedDate":"2026-09-17 17:17:32","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"90338","Ordinal":"1","Title":"serial: amba-pl011: keep console clock enabled for atomic writes","CVE":"CVE-2026-90338","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"90338","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: amba-pl011: keep console clock enabled for atomic writes\n\npl011_console_write_atomic() runs from nbcon atomic context, where\nsleeping is not allowed. It calls clk_enable(), which takes the common-clk\nenable_lock. Under PREEMPT_RT that is a sleeping lock:\nclk_enable_lock() first tries spin_trylock_irqsave(), but on contention\nfalls back to spin_lock_irqsave(). Therefore, an atomic-context printk on\nan RT kernel with a clk-backed pl011 can trip:\n\n  BUG: sleeping function called from invalid context at spinlock_rt.c:48\n    __might_resched from rt_spin_lock\n    rt_spin_lock from clk_enable_lock\n    clk_enable_lock from clk_enable\n    clk_enable from pl011_console_write_atomic\n    ... from vprintk_emit\n\nThis was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are\naffected; arm64 SBSA/ACPI has no clk, so clk_enable(NULL) short-circuits\nbefore the lock. In addition, write_atomic() may be invoked from NMI\ncontext and is documented to avoid locking. Removing clk_enable() from\nthe callback also avoids a potentially unsafe NMI acquisition of the\ncommon-clock enable_lock.\n\nAn nbcon atomic-capable console must be printable from any context, so\nthe clock cannot be gated between writes. Enable the clock while the\nconsole is available for output: use clk_prepare_enable() in\npl011_console_setup(), release it via clk_disable_unprepare() in the\nconsole .exit() callback, and drop the per-write clk_enable()/clk_disable()\npairs from write_atomic() and write_thread().\n\nWhen printk suspends consoles, drop the reference after\nuart_suspend_port() stops console access and restore it before\nuart_resume_port() -- but only if suspend actually marked the port\nsuspended (a wake-capable tty stays running and must keep its clock), and\nkeep it when console_suspend_enabled is false so no_console_suspend works.\n\nThe active power cost of keeping the clock enabled is platform-dependent:\nnone where the UART clock is a fixed always-on oscillator, real where it\nis a gateable clock branch, which then cannot be gated (nor possibly can\nits parent clocks) while the console is available for output. When serial\ncore actually suspends the port, the reference is released so the clock\nprovider can gate the clock tree.","Type":"Description","Title":"serial: amba-pl011: keep console clock enabled for atomic writes"}]}}}