{"id":"CVE-2024-40966","aliases":["CVE-2024-40966"],"related":[],"kind":"vulnerability","state":"published","title":"tty: add the option to have a tty reject a new ldisc","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: tty: agregue la opción para que un tty rechace un nuevo ldisc... y utilícelo para limitar las terminales virtuales a solo N_TTY. Son algo especiales y, en particular, la rutina \"con_write()\" viola la regla \"las escrituras no pueden dormir\" en la que se basan algunos ldiscs. Esto evita el ERROR: función de suspensión llamada desde un contexto no válido en kernel/printk/printk.c:2659 cuando N_GSM se ha conectado a una consola virtual, y gsmld_write() llama a con_write() mientras mantiene un spinlock, y con_write() luego intenta para obtener el bloqueo de la consola.","source":"nvd"}],"published":"2024-07-12T12:32:06.122Z","modified":"2026-06-17T07:46:58.747Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"e1eaea46bb4020b38a141b84f88565d4603f8dd0","fixed":"3c6332f3bb1578b5b10ac2561247b1d6272ae937","status":"affected"},{"type":"git","introduced":"e1eaea46bb4020b38a141b84f88565d4603f8dd0","fixed":"287b569a5b914903ba7c438a3c0dbc3410ebb409","status":"affected"},{"type":"git","introduced":"e1eaea46bb4020b38a141b84f88565d4603f8dd0","fixed":"5920ac19964f9e20181f63b410d9200ddbf8dc86","status":"affected"},{"type":"git","introduced":"e1eaea46bb4020b38a141b84f88565d4603f8dd0","fixed":"6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.35","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.35","status":"unaffected"},{"type":"semver","introduced":"6.1.96","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.36","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.7","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"6.1.96"},{"status":"affected","introduced":"6.2","fixed":"6.6.36"},{"status":"affected","introduced":"6.7","fixed":"6.9.7"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3c6332f3bb1578b5b10ac2561247b1d6272ae937","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/287b569a5b914903ba7c438a3c0dbc3410ebb409","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5920ac19964f9e20181f63b410d9200ddbf8dc86","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T17:03:10.358Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-40966","url":"https://www.cve.org/CVERecord?id=CVE-2024-40966","licence":"CVE Terms of Use","modified":"2026-05-11T20:23:17.510Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-40966","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40966","licence":"Public domain","modified":"2026-06-17T07:46:58.747Z"}],"updatedAt":"2026-11-25T22:58:42.865Z","epss":{"score":0.00288,"percentile":0.22975,"date":"2026-12-01T12:00:22.000Z"}}