# CVE-2024-40966: tty: add the option to have a tty reject a new ldisc

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 22% of CVEs (2026-12-01)
- Published: 2024-07-12T12:32:06.122Z
- Modified: 2026-06-17T07:46:58.747Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from e1eaea46bb4020b38a141b84f88565d4603f8dd0 before 3c6332f3bb1578b5b10ac2561247b1d6272ae937; from e1eaea46bb4020b38a141b84f88565d4603f8dd0 before 287b569a5b914903ba7c438a3c0dbc3410ebb409; from e1eaea46bb4020b38a141b84f88565d4603f8dd0 before 5920ac19964f9e20181f63b410d9200ddbf8dc86; from e1eaea46bb4020b38a141b84f88565d4603f8dd0 before 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b; 2.6.35 (not affected: before 2.6.35; from 6.1.96 up to 6.1.*; from 6.6.36 up to 6.6.*; from 6.9.7 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: before 6.1.96; from 6.2 before 6.6.36; from 6.7 before 6.9.7

## References

- <https://git.kernel.org/stable/c/3c6332f3bb1578b5b10ac2561247b1d6272ae937> (patch)
- <https://git.kernel.org/stable/c/287b569a5b914903ba7c438a3c0dbc3410ebb409> (patch)
- <https://git.kernel.org/stable/c/5920ac19964f9e20181f63b410d9200ddbf8dc86> (patch)
- <https://git.kernel.org/stable/c/6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-40966](https://www.cve.org/CVERecord?id=CVE-2024-40966), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-40966](https://nvd.nist.gov/vuln/detail/CVE-2024-40966), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-40966 · Whole record: https://cve.day/CVE-2024-40966.json · Rebuilt by cve.day 2026-11-25T22:58:42.865Z
