{"id":"CVE-2026-143009","state":"PUBLISHED","title":"vt: serialise the producers of the flip buffer","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvt: serialise the producers of the flip buffer\n\nTyping on a virtual console while the console replies to an escape\nsequence can make the kernel write past the end of a buffer. A user who\ncan write to the foreground console can cause this on purpose if they\ncan also inject key events, through /dev/uinput or by writing to the\n/dev/input/event* node of a keyboard.\n\nInput for a tty goes through the flip buffer of its port. A driver\ninserts the data with tty_insert_flip_*() and then calls\ntty_flip_buffer_push() to pass it on to the line discipline. The insert\nfunctions take no lock: they check that the current struct tty_buffer\nhas room, copy the data to offset ->used, and then advance ->used. So a\nflip buffer supports only one producer at a time, and a driver that has\nseveral must serialise them.\n\nFour functions feed the flip buffer of a virtual console:\n\n- put_queue(), puts_queue() and fn_send_intr() insert typed characters\n  and breaks for the keyboard handler. They run under kbd_event_lock.\n- respond_string() inserts the reply when a program writes an escape\n  sequence that requests one, such as a cursor position report. It runs\n  under the console lock.\n\nThe keyboard handler gets its events from the input layer and feeds the\nforeground console. Key events that a program writes to /dev/uinput or\nto an event node reach it in the same way as typed keys.\n\nThe keyboard handler and respond_string() share no lock, so they can\ninterleave:\n\n    keyboard handler                respond_string()\n    ================                ================\n    room check passes\n                                    room check passes\n    memcpy() to offset used\n    used += len\n                                    memcpy() to offset used\n                                    used += len\n                                      /* used > size of the buffer */\n\nThe room check subtracts ->used from the size, and both are unsigned.\nOnce ->used exceeds the size, the result wraps, so the check always\npasses, and each later insert lands further past the buffer.\n\nReproduced as root, with keys from a uinput keyboard and cursor position\nreports on the same console: KFENCE reported an out-of-bounds write\n1,024 bytes past the buffer in under 10 s.\n\nFix this by taking port->lock, with interrupts disabled, around the\ninsert and the push in these four functions. kbd_keycode() already takes\nport->lock under kbd_event_lock, so this lock ordering is not new.","publishedAt":"2026-12-03T09:17:43.522Z","updatedAt":"2026-12-03T09:17:43.522Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"880df0d36c48b5f05903179cef2a93a9d8200f01","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"4aeaf5dcd8572b594a49729b5fe1236bf1f1aed7","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"34aa97b7a23d05be25a040c5e0d74a4a153dac29","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"75003fbe02202236df8b960bd2d915bbb6c4ef21","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"5d1d814408c1c8e797031eac8ddd40de1a9e8e93","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/vt/keyboard.c","drivers/tty/vt/vt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/vt/keyboard.c","drivers/tty/vt/vt.c"]}],"references":["https://git.kernel.org/stable/c/880df0d36c48b5f05903179cef2a93a9d8200f01","https://git.kernel.org/stable/c/4aeaf5dcd8572b594a49729b5fe1236bf1f1aed7","https://git.kernel.org/stable/c/34aa97b7a23d05be25a040c5e0d74a4a153dac29","https://git.kernel.org/stable/c/75003fbe02202236df8b960bd2d915bbb6c4ef21","https://git.kernel.org/stable/c/5d1d814408c1c8e797031eac8ddd40de1a9e8e93"],"weaknesses":[],"ingestedAt":"2026-12-03T09:26:06.073Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143009.json","commit":"9fd484e43f2e14021809e195d28c1172759faad0","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143009","state":"PUBLISHED","datePublished":"2026-12-03T09:17:43.522Z","dateUpdated":"2026-12-03T09:17:43.522Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.342Z"},"containers":{"cna":{"title":"vt: serialise the producers of the flip buffer","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvt: serialise the producers of the flip buffer\n\nTyping on a virtual console while the console replies to an escape\nsequence can make the kernel write past the end of a buffer. A user who\ncan write to the foreground console can cause this on purpose if they\ncan also inject key events, through /dev/uinput or by writing to the\n/dev/input/event* node of a keyboard.\n\nInput for a tty goes through the flip buffer of its port. A driver\ninserts the data with tty_insert_flip_*() and then calls\ntty_flip_buffer_push() to pass it on to the line discipline. The insert\nfunctions take no lock: they check that the current struct tty_buffer\nhas room, copy the data to offset ->used, and then advance ->used. So a\nflip buffer supports only one producer at a time, and a driver that has\nseveral must serialise them.\n\nFour functions feed the flip buffer of a virtual console:\n\n- put_queue(), puts_queue() and fn_send_intr() insert typed characters\n  and breaks for the keyboard handler. They run under kbd_event_lock.\n- respond_string() inserts the reply when a program writes an escape\n  sequence that requests one, such as a cursor position report. It runs\n  under the console lock.\n\nThe keyboard handler gets its events from the input layer and feeds the\nforeground console. Key events that a program writes to /dev/uinput or\nto an event node reach it in the same way as typed keys.\n\nThe keyboard handler and respond_string() share no lock, so they can\ninterleave:\n\n    keyboard handler                respond_string()\n    ================                ================\n    room check passes\n                                    room check passes\n    memcpy() to offset used\n    used += len\n                                    memcpy() to offset used\n                                    used += len\n                                      /* used > size of the buffer */\n\nThe room check subtracts ->used from the size, and both are unsigned.\nOnce ->used exceeds the size, the result wraps, so the check always\npasses, and each later insert lands further past the buffer.\n\nReproduced as root, with keys from a uinput keyboard and cursor position\nreports on the same console: KFENCE reported an out-of-bounds write\n1,024 bytes past the buffer in under 10 s.\n\nFix this by taking port->lock, with interrupts disabled, around the\ninsert and the push in these four functions. kbd_keycode() already takes\nport->lock under kbd_event_lock, so this lock ordering is not new."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"880df0d36c48b5f05903179cef2a93a9d8200f01","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"4aeaf5dcd8572b594a49729b5fe1236bf1f1aed7","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"34aa97b7a23d05be25a040c5e0d74a4a153dac29","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"75003fbe02202236df8b960bd2d915bbb6c4ef21","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"5d1d814408c1c8e797031eac8ddd40de1a9e8e93","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/vt/keyboard.c","drivers/tty/vt/vt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/vt/keyboard.c","drivers/tty/vt/vt.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/880df0d36c48b5f05903179cef2a93a9d8200f01"},{"url":"https://git.kernel.org/stable/c/4aeaf5dcd8572b594a49729b5fe1236bf1f1aed7"},{"url":"https://git.kernel.org/stable/c/34aa97b7a23d05be25a040c5e0d74a4a153dac29"},{"url":"https://git.kernel.org/stable/c/75003fbe02202236df8b960bd2d915bbb6c4ef21"},{"url":"https://git.kernel.org/stable/c/5d1d814408c1c8e797031eac8ddd40de1a9e8e93"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:17:43.522Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"7.4-rc4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}