{"id":"CVE-2024-40966","summary":"tty: add the option to have a tty reject a new ldisc","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ntty: add the option to have a tty reject a new ldisc\n\n... and use it to limit the virtual terminals to just N_TTY.  They are\nkind of special, and in particular, the \"con_write()\" routine violates\nthe \"writes cannot sleep\" rule that some ldiscs rely on.\n\nThis avoids the\n\n   BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659\n\nwhen N_GSM has been attached to a virtual console, and gsmld_write()\ncalls con_write() while holding a spinlock, and con_write() then tries\nto get the console lock.","modified":"2026-03-20T12:37:26.115692Z","published":"2024-07-12T12:32:06.122Z","related":["SUSE-SU-2024:2802-1","SUSE-SU-2024:2892-1","SUSE-SU-2024:2894-1","SUSE-SU-2024:2896-1","SUSE-SU-2024:2901-1","SUSE-SU-2024:2939-1","SUSE-SU-2024:2940-1","SUSE-SU-2024:2947-1","SUSE-SU-2024:2973-1","SUSE-SU-2025:20008-1","SUSE-SU-2025:20028-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40966.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/287b569a5b914903ba7c438a3c0dbc3410ebb409"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3c6332f3bb1578b5b10ac2561247b1d6272ae937"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5920ac19964f9e20181f63b410d9200ddbf8dc86"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40966.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40966"},{"type":"PACKAGE","url":"https://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"}}],"schema_version":"1.7.5"}