CVE-2024-40966
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-40966 addresses a vulnerability in the Linux kernel's TTY (teletype) subsystem. The issue was discovered when it was found that the virtual console's con_write() routine violates the 'writes cannot sleep' rule that some line disciplines rely on. This vulnerability was reported by syzbot and was resolved by adding an option to have a TTY reject a new line discipline, specifically limiting virtual terminals to just N_TTY (Kernel Git).

Technical details

The vulnerability manifests when N_GSM has been attached to a virtual console, and gsmld_write() calls con_write() while holding a spinlock, and con_write() then attempts to get the console lock. This results in a BUG condition with the error message 'sleeping function called from invalid context at kernel/printk/printk.c:2659'. The fix involves implementing a new TTY driver option that allows rejection of specific line disciplines, ensuring that virtual terminals only use N_TTY (Kernel Git).

Impact

When exploited, this vulnerability can lead to a system crash (denial of service) due to an invalid context sleeping function call in the kernel's TTY subsystem (NVD).

Exploitability

The vulnerability requires local access to the system and the ability to manipulate TTY line disciplines. It was discovered through automated testing by syzbot, indicating it could be reliably triggered under specific conditions (Kernel Git).

Mitigation and workarounds

The issue has been patched in the Linux kernel by adding a new TTY driver option that restricts virtual terminals to only use the N_TTY line discipline. The fix has been incorporated into various Linux distributions' security updates, including Debian and Ubuntu (Ubuntu Security, Debian LTS).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux: 6.1.99-1

Fixed

bullseye

linux-6.1: 6.1.119-1~deb11u1

Fixed

sid

linux: 6.9.7-1

Fixed

trixie

linux: 6.9.7-1

Fixed

SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-80904MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • linux-oracle-7.0
NoYesSep 04, 2026
CVE-2026-80905MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • linux-azure-6.8
NoYesSep 04, 2026
CVE-2026-80913MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-intel-iotg
NoYesSep 04, 2026
CVE-2026-80912MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-lowlatency-hwe-5.15
NoYesSep 04, 2026
CVE-2026-80906NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-4.15
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management