CVE-2024-40966

Source
https://cve.org/CVERecord?id=CVE-2024-40966
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40966.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-40966
Downstream
Related
Published
2024-07-12T12:32:06.122Z
Modified
2026-03-13T07:56:06.403649Z
Summary
tty: add the option to have a tty reject a new ldisc
Details

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 NTTY. They are kind of special, and in particular, the "conwrite()" 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 NGSM has been attached to a virtual console, and gsmldwrite() calls conwrite() while holding a spinlock, and conwrite() then tries to get the console lock.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40966.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e1eaea46bb4020b38a141b84f88565d4603f8dd0
Fixed
3c6332f3bb1578b5b10ac2561247b1d6272ae937
Fixed
287b569a5b914903ba7c438a3c0dbc3410ebb409
Fixed
5920ac19964f9e20181f63b410d9200ddbf8dc86
Fixed
6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40966.json"