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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **Published:** 2024-07-12T12:32:06.122Z
- **Modified:** 2026-06-17T07:46:58.747Z

## Who should check

- Anyone running Linux \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 3c6332f3bb1578b5b10ac2561247b1d6272ae937; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 287b569a5b914903ba7c438a3c0dbc3410ebb409; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5920ac19964f9e20181f63b410d9200ddbf8dc86; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b
- Anyone running Linux 2.6.35

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

## Affected and fixed versions

- Linux: \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 3c6332f3bb1578b5b10ac2561247b1d6272ae937; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 287b569a5b914903ba7c438a3c0dbc3410ebb409; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5920ac19964f9e20181f63b410d9200ddbf8dc86; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b (cvelist)
- Linux: 2.6.35 (cvelist)

## Mitigation

- Upgrade Linux to 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-40966. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-40966.md
Affected: Linux >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < 3c6332f3bb1578b5b10ac2561247b1d6272ae937; >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < 287b569a5b914903ba7c438a3c0dbc3410ebb409; >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < 5920ac19964f9e20181f63b410d9200ddbf8dc86; >= e1eaea46bb4020b38a141b8…
Fixed in: Linux 3c6332f3bb1578b5b10ac2561247b1d6272ae937, Linux 287b569a5b914903ba7c438a3c0dbc3410ebb409, Linux 5920ac19964f9e20181f63b410d9200ddbf8dc86, Linux 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-40966 being exploited?

There is no confirmed exploitation: CVE-2024-40966 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-40966?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-40966?

Linux \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 3c6332f3bb1578b5b10ac2561247b1d6272ae937; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 287b569a5b914903ba7c438a3c0dbc3410ebb409; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5920ac19964f9e20181f63b410d9200ddbf8dc86; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b; Linux 2.6.35.

### Is there a fix for CVE-2024-40966?

Yes. Fixed in Linux 3c6332f3bb1578b5b10ac2561247b1d6272ae937, Linux 287b569a5b914903ba7c438a3c0dbc3410ebb409, Linux 5920ac19964f9e20181f63b410d9200ddbf8dc86, Linux 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b. Upgrade Linux to 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b or later.

### How do I check if I'm affected by CVE-2024-40966?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-40966>

HTML: <https://flawdb.com/CVE-2024-40966> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-40966>
