tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT
In the Linux kernel, the following vulnerability has been resolved: tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT This requirement was overeagerly loosened in commit 2f83e38a095f ("tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN"), but as it turns out, (1) the logic I implemented there was inconsistent (apologies!), (2) TIOCL_SELMOUSEREPORT might actually be a small security risk after all, and (3) TIOCL_SELMOUSEREPORT is only meant to be used by the mouse daemon (GPM or Consolation), which runs as CAP_SYS_ADMIN already. In more detail: 1. The previous patch has inconsistent logic: In commit 2f83e38a095f ("tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN"), we checked for sel_mode == TIOCL_SELMOUSEREPORT, but overlooked that the lower four bits of this "mode" parameter were actually used as an additional way to pass an argument. So the patch did actually still require CAP_SYS_ADMIN, if any of the mouse button bits are set, but did not require it if none of the mouse buttons bits are set. This logic is inconsistent and was not intentional. We should have the same policies for using TIOCL_SELMOUSEREPORT independent of the value of the "hidden" mouse button argument. I sent a separate documentation patch to the man page list with more details on TIOCL_SELMOUSEREPORT: https://lore.kernel.org/all/20250223091342.35523-2-gnoack3000@gmail.com/ 2. TIOCL_SELMOUSEREPORT is indeed a potential security risk which can let an attacker simulate "keyboard" input to command line applications on the same terminal, like TIOCSTI and some other TIOCLINUX "selection mode" IOCTLs. By enabling mouse reporting on a terminal and then injecting mouse reports through TIOCL_SELMOUSEREPORT, an attacker can simulate mouse movements on the same terminal, similar to the TIOCSTI keystroke injection attacks that were previously possible with TIOCSTI and other TIOCL_SETSEL selection modes. Many programs (including libreadline/bash) are then prone to misinterpret these mouse reports as normal keyboard input because they do not expect input in the X11 mouse protocol form. The attacker does not have complete control over the escape sequence, but they can at least control the values of two consecutive bytes in the binary mouse reporting escape sequence. I went into more detail on that in the discussion at https://lore.kernel.org/all/20250221.0a947528d8f3@gnoack.org/ It is not equally trivial to simulate arbitrary keystrokes as it was with TIOCSTI (commit 83efeeeb3d04 ("tty: Allow TIOCSTI to be disabled")), but the general mechanism is there, and together with the small number of existing legit use cases (see below), it would be better to revert back to requiring CAP_SYS_ADMIN for TIOCL_SELMOUSEREPORT, as it was already the case before commit 2f83e38a095f ("tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN"). 3. TIOCL_SELMOUSEREPORT is only used by the mouse daemons (GPM or Consolation), and they are the only legit use case: To quote console_codes(4): The mouse tracking facility is intended to return xterm(1)-compatible mouse status reports. Because the console driver has no way to know the device or type of the mouse, these reports are returned in the console input stream only when the virtual terminal driver receives a mouse update ioctl. These ioctls must be generated by a mouse-aware user-mode application such as the gpm(8) daemon. Jared Finder has also confirmed in https://lore.kernel.org/all/491f3df9de6593df8e70dbe77614b026@finder.org/ that Emacs does not call TIOCL_SELMOUSEREPORT directly, and it would be difficult to find good reasons for doing that, given that it would interfere with the reports that GPM is sending. More information on the interaction between GPM, terminals and th ---truncated---
- Опубликовано
- 8 мая 2025 г.
- Обновлено
- 5 авг. 2026 г.
- EPSS
- 0,2 % · 10-й процентиль
- CWE
- —
Войдите, чтобы следить · Вы получите уведомление, если запись попадёт в KEV, получит эксплойт или обновится.
Инструменты для отчёта
Оценка срочности
22
Наблюдать
Пока низкий приоритет.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Нет в списке
- EPSS
- 0 / 30 · 0,2 %
Оценка CNA и NVD
- NVD
- 5,5
- CNA · Linux
- 7,8
- разница 2,3 балла
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Оценка присваивающего органа и независимая оценка NVD. Разрыв означает, что критичность спорна.
Анализ Noroxi
Анализа Noroxi для этой записи пока нет
Мы не пишем анализ вручную для сотен тысяч уязвимостей в базе; это было бы нечестно. Для значимых уязвимостей с реальным влиянием наша команда описывает механизм, обнаружение и устранение.
Мы используем этот продукт, нужна помощьЗатронутые системы
| Вендор | Продукт | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Затронутые версии
Диапазоны версий NVD (для продуктов из каталога). Добавьте продукт в стек с версией, и сопоставление будет по ним.
- linux linux kernel6.12.14 и новее · до 6.12.26
- linux linux kernel6.13.3 и новее · до 6.14.5
- linux linux kernel6.15
Версии, заявленные вендором
Диапазоны затронутых версий, заявленные назначающей организацией (Linux). Не зависят от анализа CPE в NVD и обычно опережают его.
Linux Linux
- 2714ffdbb79b48dda03334a01af90fb024f39047, 6.14затронута
- e46d91ca504d69ae3d09c120b162a238b8013890 и новее · до 6f021bc0083b96125fdbed6a60d7b4396c4d6dacзатронута · git
- 2f83e38a095f8bf7c6029883d894668b03b9bd93 и новее · до 9b50c9c97db953de756a39af83d4be4d7f618aa6затронута · git
- 2f83e38a095f8bf7c6029883d894668b03b9bd93 и новее · до ee6a44da3c87cf64d67dd02be8c0127a5bf56175затронута · git
- 6.12.14 и новее · до 6.12.26затронута · semver
- 6.13.3 и новее · до 6.14затронута · semver
- до 6.14не затронута · semver
- 6.12.26 и новее · до 6.12.* включительноне затронута · semver
- 6.14.5 и новее · до 6.14.* включительноне затронута · semver
- 6.15 и новеене затронута · original_commit_for_fix
Затронутые пакеты
Данные OSV и GitHub Advisory: экосистема, пакет и диапазон. Сопоставление SBOM использует эту таблицу.
| Экосистема | Пакет | Затронутый диапазон | Исправление |
|---|---|---|---|
| Debian:13 | linux | до 6.12.27-1 | 6.12.27-1 |
Тот же продукт
linux: все записиДругие записи с наивысшей оценкой для того же основного продукта.
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Срочно
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Срочно
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Срочно
- CVE-2019-13272In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to creKEV77На этой неделе
- CVE-2013-6282The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the v6k and v7 ARM platforms do not validate certain addKEV77На этой неделе
- CVE-2013-2094The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9 uses an incorrect integer data type, which allows loKEV77На этой неделе
Исправление
На какую версию обновиться
Версии с исправлением по данным вендора, реестров пакетов и Microsoft. Перед обновлением сверьтесь с бюллетенем вендора.
| Продукт / пакет | Исправленная версия | Источник |
|---|---|---|
| Linux Linux | 6.12.26 | Вендор (CNA) |
| Linux Linux | 6.14 | Вендор (CNA) |
| Linux Linux | 6f021bc0083b96125fdbed6a60d7b4396c4d6dac | Вендор (CNA) |
| Linux Linux | 9b50c9c97db953de756a39af83d4be4d7f618aa6 | Вендор (CNA) |
| Linux Linux | ee6a44da3c87cf64d67dd02be8c0127a5bf56175 | Вендор (CNA) |
| debian:linux | 6.12.27-1 · Debian:13 | Реестр пакетов (OSV) |
Статус эксплойта
Публичный эксплойт неизвестен
Публичный эксплойт пока не обнаружен. Это не значит, что вы в безопасности, лишь что порог чуть выше.
Контекст для исследователя
Для пентестеров и исследователей: профиль атаки, расхождение оценок, хронология, коммиты исправлений, авторы, кандидаты в варианты и цепочки, охват bug bounty. Всё выводится из имеющихся данных; без кода эксплойтов.
Хронология
От публикации до сегодня: proof of concept, модуль Metasploit, CISA KEV и запись об исправлении. Даты — как сообщают источники.
Кроме публикации датированных событий нет.
Ежедневная оценка FIRST EPSS; записываются только изменения от 0,01 (ступенчатый график).
Ссылки на патчи и коммиты
Коммиты, PR и diff среди источников. Отправная точка для patch-diff и поиска вариантов; это исправления, не эксплойты.
Среди источников нет ссылок на коммит или PR.
Авторы
Все исследователиНашедшие, сообщившие и аналитики, названные в записи CNA. Нажмите имя, чтобы увидеть другие записи исследователя.
В записи CNA нет авторов.
Кандидаты в варианты
Тот же продукт, тот же класс уязвимости, в пределах 18 месяцев. Если патч не закрыл первопричину, родственная ошибка здесь.
Ночной расчёт связей ничего не нашёл.
Кандидаты в цепочки
Обход аутентификации и уязвимость, требующая привилегий, в одном продукте и близко по времени: вместе они могут дать путь без аутентификации.
—
Охват bug bounty
Известной публичной программы нет.
Источник: bounty-targets-data (публичные списки HackerOne, Bugcrowd, Intigriti, YesWeHack).
Технические детали
Условия атаки
- Может быть вызвана пользователем с локальным доступом к системе.
- Достаточно учётной записи с низкими привилегиями.
- Действия пользователя не требуются.
- Особые условия не требуются; воспроизводится стабильно.
В случае успеха
- Конфиденциальность
- нет
- Целостность
- нет
- Доступность
- высокое · работа сервиса может быть нарушена
- Вектор атаки
- Локальный
- Сложность атаки
- Низкая
- Требуемые привилегии
- Низкие
- Взаимодействие с пользователем
- Не требуется
- Область действия
- Не изменяется
- Влияние на конфиденциальность
- Нет
- Влияние на целостность
- Нет
- Влияние на доступность
- Высокое
Класс уязвимости (CWE)
—
Вектор CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Контекст атаки
Шаблоны атак MITRE CAPEC и техники ATT&CK для этого класса уязвимости (CWE). Отправная точка для правил обнаружения и threat hunting.
У MITRE нет сопоставления CAPEC/ATT&CK для этого CWE.
Журнал изменений
- Исправление✗ → ✓
Для отслеживаемых записей эти изменения приходят и как уведомления. →
Источники
- git.kernel.org/stable/c/6f021bc0083b96125fdbed6a60d7b4396c4d6dac
- git.kernel.org/stable/c/9b50c9c97db953de756a39af83d4be4d7f618aa6
- git.kernel.org/stable/c/ee6a44da3c87cf64d67dd02be8c0127a5bf56175
Рекомендации вендоров и официальные записи. Ссылки на эксплойты/PoC намеренно исключены.