CVE-2024-40966 tty: add the option to have a tty reject a new ldisc
A kernel bug causes a system crash when specific line disciplines are attached to virtual terminals, requiring a patch to prevent denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-40966?
CVE-2024-40966 is a medium-severity denial of service vulnerability in Linux kernel, published on 12 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
tty: add the option to have a tty reject a new ldisc
... and use it to limit the virtual terminals to just N_TTY. They are kind of special, and in particular, the "con_write()" routine violates the "writes cannot sleep" rule that some ldiscs rely on.
This avoids the
BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659
when N_GSM has been attached to a virtual console, and gsmld_write() calls con_write() while holding a spinlock, and con_write() then tries to get the console lock.
Which versions are affected by CVE-2024-40966?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-40966?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-40966 being exploited?
There is no known exploitation of CVE-2024-40966 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-68214, BELL-CVE-2024-40966, DEBIAN-CVE-2024-40966, GHSA-3cf6-344v-4fmg, ROOT-OS-DEBIAN-11-CVE-2024-40966, ROOT-OS-UBUNTU-2204-CVE-2024-40966 and 1 more.