drm/gem: Try to fix change_handle ioctl, attempt 4
In the Linux kernel, the following vulnerability has been resolved: drm/gem: Try to fix change_handle ioctl, attempt 4 [airlied: just added some comments on how to reenable] On-list because the cat is out of the bag and we're clearly not good enough to figure this out in private. The story thus far: 5e28b7b94408 ("drm: Set old handle to NULL before prime swap in change_handle") tried to fix a race condition between the gem_close and gem_change_handle ioctls, but got a few things wrong: - There's a confusion with the local variable handle, which is actually the new handle, and so the two-stage trick was actually applied to the wrong idr slot. 7164d78559b0 ("drm/gem: fix race between change_handle and handle_delete") tried to fix that by adding yet another code block, but forgot to add the error handling. Which meant we now have two paths, both kinda wrong. - dc366607c41c ("drm: Replace old pointer to new idr") tried to apply another fix, but inconsistently, again because of the handle confusion - this would be the right fix (kinda, somewhat, it's a mess) if we'd do the two-stage approach for the new handle. Except that wasn't the intent of the original fix. We also didn't have an igt merged for the original ioctl, which is a big no-go. This was attempted to address off-list in the original bugfix, and amd QA people claimed the bug was fixed now. Very clearly that's not the case. Here's my attempt to sort this out: - Rename the local variable to new_handle, the old aliasing with args->handle is just too dangerously confusing. - Merge the gem obj lookup with the two-stage idr_replace so that we avoid getting ourselves confused there. - This means we don't have a surplus temporary reference anymore, only an inherited from the idr. A concurrent gem_close on the new_handle could steal that. Fix that with the same two-stage approach create_tail uses. This is a bit overkill as documented in the comment, but I also don't trust my ability to understand this all correctly, so go with the established pattern we have from other ioctls instead for maximum paranoia. - Adjust error paths. I've tried to make the error and success paths common, because they are identical except for which handle is removed and on which we call idr_replace to (re)install the object again. But that made things messier to read, so I've left it at the more verbose version, which unfortunately hides the symmetry in the entire code flow a bit. - While at it, also replace the 7 space indent with 1 tab. And finally, because I flat out don't trust my abilities here at all anymore: - Disable the ioctl until we have the igt situation and everything else sorted out on-list and with full consensus. v2: Sashiko noticed that I didn't handle the error path for idr_replace correctly, it must be checked with IS_ERR_OR_NULL like in gem_handle_delete. So yeah, definitely should just the existing paths 1:1 because this is endless amounts of tricky. Also add the Fixes: line for the original ioctl, I forgot that too.
- Опубликовано
- 25 июн. 2026 г.
- Обновлено
- 5 авг. 2026 г.
- EPSS
- 0,1 % · 1-й процентиль
- CWE
- CWE-367
Войдите, чтобы следить · Вы получите уведомление, если запись попадёт в KEV, получит эксплойт или обновится.
Инструменты для отчёта
Оценка срочности
31
Наблюдать
Пока низкий приоритет.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Нет в списке
- EPSS
- 0 / 30 · 0,1 %
Оценка CNA и NVD
- NVD
- —
- CNA · Linux
- 7,8
- NVD ещё не выставил свою оценку; показана оценка CNA.
Оценка присваивающего органа и независимая оценка NVD. Разрыв означает, что критичность спорна.
Затронутые системы
| Вендор | Продукт | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
Затронутые версии
Диапазоны версий NVD (для продуктов из каталога). Добавьте продукт в стек с версией, и сопоставление будет по ним.
- linux linux kernel7.0.9 и новее · до 7.0.13
- linux linux kernel6.18.32 и новее · до 6.18.36
- linux linux kernel7.1
- redhat enterprise linux10.0
- redhat enterprise linux7.0
- redhat enterprise linux8.0
- redhat enterprise linux9.0
Версии, заявленные вендором
Диапазоны затронутых версий, заявленные назначающей организацией (Linux). Не зависят от анализа CPE в NVD и обычно опережают его.
Linux Linux
- 318b995cffcfcaa69a234d28123a3f4ae186a9df, 38f12d0e10d83b66fa1466400d876a3a8da31542, 0dfa42cfe4dbe114533480503934f43e33c1e83d, cde2c9257cbe8463b9dcf7b1075177b72b5fd938затронута
- 672464dd53231509c9c771110798c56d4660e19e и новее · до c0639ede2f24ac224b2079cd35ecd5fd8ad4e3cdзатронута · git
- 61bd96d3e5472c253f9c1ab77608f0c8aaa9d025 и новее · до 1d9b93df7fc768228906e24220591ec1cddad391затронута · git
- 5e28b7b94408897e41c63477aabc9e1db439bc8c и новее · до 1a4f03d22fb655e5f192244fb2c87d8066fcfca2затронута · git
- 6.18.32 и новее · до 6.18.36затронута · semver
- 7.0.9 и новее · до 7.0.13затронута · semver
Затронутые пакеты
Данные OSV и GitHub Advisory: экосистема, пакет и диапазон. Сопоставление SBOM использует эту таблицу.
| Экосистема | Пакет | Затронутый диапазон | Исправление |
|---|---|---|---|
| Debian:14 | linux | до 7.0.13-1 | 7.0.13-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 | 1a4f03d22fb655e5f192244fb2c87d8066fcfca2 | Вендор (CNA) |
| Linux Linux | 1d9b93df7fc768228906e24220591ec1cddad391 | Вендор (CNA) |
| Linux Linux | 6.18.36 | Вендор (CNA) |
| Linux Linux | 7.0.13 | Вендор (CNA) |
| Linux Linux | c0639ede2f24ac224b2079cd35ecd5fd8ad4e3cd | Вендор (CNA) |
| debian:linux | 7.0.13-1 · Debian:14 | Реестр пакетов (OSV) |
Статус эксплойта
Публичный эксплойт неизвестен
Публичный эксплойт пока не обнаружен. Это не значит, что вы в безопасности, лишь что порог чуть выше.
Контекст для исследователя
Для пентестеров и исследователей: профиль атаки, расхождение оценок, хронология, коммиты исправлений, авторы, кандидаты в варианты и цепочки, охват bug bounty. Всё выводится из имеющихся данных; без кода эксплойтов.
Хронология
От публикации до сегодня: proof of concept, модуль Metasploit, CISA KEV и запись об исправлении. Даты — как сообщают источники.
Кроме публикации датированных событий нет.
Ежедневная оценка FIRST EPSS; записываются только изменения от 0,01 (ступенчатый график).
Ссылки на патчи и коммиты
Коммиты, PR и diff среди источников. Отправная точка для patch-diff и поиска вариантов; это исправления, не эксплойты.
Среди источников нет ссылок на коммит или PR.
Авторы
Все исследователиНашедшие, сообщившие и аналитики, названные в записи CNA. Нажмите имя, чтобы увидеть другие записи исследователя.
В записи CNA нет авторов.
Кандидаты в варианты
Тот же продукт, тот же класс уязвимости, в пределах 18 месяцев. Если патч не закрыл первопричину, родственная ошибка здесь.
- CVE-2025-38352с разницей 338 дн.posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()KEV61На этой неделе
- CVE-2026-64091с разницей 24 дн.batman-adv: tt: fix TOCTOU race for reported vlans39Наблюдать
- CVE-2026-53250с разницей 0 дн.xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()31Наблюдать
- CVE-2026-64112с разницей 24 дн.rbd: eliminate a race in lock_dwork draining on unmap31Наблюдать
- CVE-2026-43433с разницей 48 дн.rust_binder: avoid reading the written value in offsets array31Наблюдать
- CVE-2026-31678с разницей 61 дн.openvswitch: defer tunnel netdev_put to RCU release31Наблюдать
Кандидаты в цепочки
Обход аутентификации и уязвимость, требующая привилегий, в одном продукте и близко по времени: вместе они могут дать путь без аутентификации.
—
Охват bug bounty
Известной публичной программы нет.
Источник: bounty-targets-data (публичные списки HackerOne, Bugcrowd, Intigriti, YesWeHack).
Технические детали
Условия атаки
- Может быть вызвана пользователем с локальным доступом к системе.
- Достаточно учётной записи с низкими привилегиями.
- Действия пользователя не требуются.
- Особые условия не требуются; воспроизводится стабильно.
В случае успеха
- Конфиденциальность
- высокое · данные могут быть прочитаны
- Целостность
- высокое · данные или конфигурация могут быть изменены
- Доступность
- высокое · работа сервиса может быть нарушена
- Вектор атаки
- Локальный
- Сложность атаки
- Низкая
- Требуемые привилегии
- Низкие
- Взаимодействие с пользователем
- Не требуется
- Область действия
- Не изменяется
- Влияние на конфиденциальность
- Высокое
- Влияние на целостность
- Высокое
- Влияние на доступность
- Высокое
Класс уязвимости (CWE)
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race ConditionВектор CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Контекст атаки
Шаблоны атак MITRE CAPEC и техники ATT&CK для этого класса уязвимости (CWE). Отправная точка для правил обнаружения и threat hunting.
Анализ Noroxi
Анализа Noroxi для этой записи пока нет
Мы не пишем анализ вручную для всех 385 000+ уязвимостей; это было бы нечестно. Для значимых уязвимостей с реальным влиянием наша команда описывает механизм, обнаружение и устранение.
Мы используем этот продукт, нужна помощьЖурнал изменений
- Исправление✗ → ✓
Для отслеживаемых записей эти изменения приходят и как уведомления. →
Источники
- git.kernel.org/stable/c/1a4f03d22fb655e5f192244fb2c87d8066fcfca2
- git.kernel.org/stable/c/1d9b93df7fc768228906e24220591ec1cddad391
- git.kernel.org/stable/c/c0639ede2f24ac224b2079cd35ecd5fd8ad4e3cd
- access.redhat.com/security/cve/CVE-2026-53145
- bugzilla.redhat.com/show_bug.cgi?id=2492773
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-53145.json
Рекомендации вендоров и официальные записи. Ссылки на эксплойты/PoC намеренно исключены.