CVE-2025-38100
JSON

5.5medium

x86/iopl: Cure TIF_IO_BITMAP inconsistencies

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: x86/iopl: Cure TIF_IO_BITMAP inconsistencies io_bitmap_exit() is invoked from exit_thread() when a task exists or when a fork fails. In the latter case the exit_thread() cleans up resources which were allocated during fork(). io_bitmap_exit() invokes task_update_io_bitmap(), which in turn ends up in tss_update_io_bitmap(). tss_update_io_bitmap() operates on the current task. If current has TIF_IO_BITMAP set, but no bitmap installed, tss_update_io_bitmap() crashes with a NULL pointer dereference. There are two issues, which lead to that problem: 1) io_bitmap_exit() should not invoke task_update_io_bitmap() when the task, which is cleaned up, is not the current task. That's a clear indicator for a cleanup after a failed fork(). 2) A task should not have TIF_IO_BITMAP set and neither a bitmap installed nor IOPL emulation level 3 activated. This happens when a kernel thread is created in the context of a user space thread, which has TIF_IO_BITMAP set as the thread flags are copied and the IO bitmap pointer is cleared. Other than in the failed fork() case this has no impact because kernel threads including IO workers never return to user space and therefore never invoke tss_update_io_bitmap(). Cure this by adding the missing cleanups and checks: 1) Prevent io_bitmap_exit() to invoke task_update_io_bitmap() if the to be cleaned up task is not the current task. 2) Clear TIF_IO_BITMAP in copy_thread() unconditionally. For user space forks it is set later, when the IO bitmap is inherited in io_bitmap_share(). For paranoia sake, add a warning into tss_update_io_bitmap() to catch the case, when that code is invoked with inconsistent state.

Affected

Product or packageVersionsReported by
Linux Linuxfrom ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before d64b7b05a827f98d068f412969eef65489b0cf03, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before 2dace5e016c991424a3dc6e83b1ae5dca8992d08, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before aa5ce1485562f20235b4c759eee5ab0c41d2c220, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before 2cfcbe1554c119402e7382de974c26b0549899fe, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before b3b3b6366dc8eb5b22edba9adc4bff3cdacfd64c, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before 73cfcc8445585b8af7e18be3c9246b851fdf336c, from ea5f1cd7ab494f65f50f338299eabb40ad6a1767 before 8b68e978718f14fdcb080c2a7791c52a0d09bc6d, 5.5
Not affected: before 5.5, from 5.10.239 up to 5.10.*, from 5.15.186 up to 5.15.*, from 6.1.142 up to 6.1.*, from 6.6.94 up to 6.6.*, from 6.12.34 up to 6.12.*
CVE List
linux linux_kernelfrom 5.5 before 5.10.239, from 5.11 before 5.15.186, from 5.16 before 6.1.142, from 6.2 before 6.6.94, from 6.7 before 6.12.34, from 6.13 before 6.15.3NVD
debian debian_linux11.0NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: x86/iopl: Cure TIF_IO_BITMAP inconsistencies io_bitmap_exit() is invoked from exit_thread() when a task exists or when a fork fails. In the latter case the exit_thread() cleans up resources which were allocated during fork(). io_bitmap_exit() invokes task_update_io_bitmap(), which in turn ends up in tss_update_io_bitmap(). tss_update_io_bitmap() operates on the current task. If current has TIF_IO_BITMAP set, but no bitmap installed, tss_update_io_bitmap() crashes with a NULL pointer dereference. There are two issues, which lead to that problem: 1) io_bitmap_exit() should not invoke task_update_io_bitmap() when the task, which is cleaned up, is not the current task. That's a clear indicator for a cleanup after a failed fork(). 2) A task should not have TIF_IO_BITMAP set and neither a bitmap installed nor IOPL emulation level 3 activated. This happens when a kernel thread is created in the context of a user space thread, which has TIF_IO_BITMAP set as the thread flags are copied and the IO bitmap pointer is cleared. Other than in the failed fork() case this has no impact because kernel threads including IO workers never return to user space and therefore never invoke tss_update_io_bitmap(). Cure this by adding the missing cleanups and checks: 1) Prevent io_bitmap_exit() to invoke task_update_io_bitmap() if the to be cleaned up task is not the current task. 2) Clear TIF_IO_BITMAP in copy_thread() unconditionally. For user space forks it is set later, when the IO bitmap is inherited in io_bitmap_share(). For paranoia sake, add a warning into tss_update_io_bitmap() to catch the case, when that code is invoked with inconsistent state.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/iopl: Solucionar inconsistencias de TIF_IO_BITMAP. io_bitmap_exit() se invoca desde exit_thread() cuando existe una tarea o cuando falla una bifurcación. En este último caso, exit_thread() limpia los recursos asignados durante fork(). io_bitmap_exit() invoca task_update_io_bitmap(), que a su vez termina en tss_update_io_bitmap(). tss_update_io_bitmap() opera en la tarea actual. Si la tarea actual tiene TIF_IO_BITMAP configurado, pero no hay ningún mapa de bits instalado, tss_update_io_bitmap() se bloquea con una desreferencia de puntero NULL. Hay dos problemas que conducen a este problema: 1) io_bitmap_exit() no debería invocar task_update_io_bitmap() cuando la tarea, que se limpia, no es la tarea actual. Esto es un indicador claro de una limpieza después de un fork() fallido. 2) Una tarea no debe tener TIF_IO_BITMAP establecido ni un mapa de bits instalado ni el nivel de emulación IOPL 3 activado. Esto sucede cuando se crea un hilo del kernel en el contexto de un hilo del espacio de usuario, que tiene TIF_IO_BITMAP establecido a medida que se copian los indicadores del hilo y se borra el puntero del mapa de bits de E/S. Aparte del caso del fork() fallido, esto no tiene impacto porque los hilos del kernel, incluidos los trabajadores de E/S, nunca vuelven al espacio de usuario y, por lo tanto, nunca invocan tss_update_io_bitmap(). Solucione esto añadiendo las limpiezas y comprobaciones que faltan: 1) Evite que io_bitmap_exit() invoque task_update_io_bitmap() si la tarea que se va a limpiar no es la tarea actual. 2) Borre TIF_IO_BITMAP en copy_thread() incondicionalmente. Para las bifurcaciones del espacio de usuario, se establece más tarde, cuando el mapa de bits de E/S se hereda en io_bitmap_share(). Por el bien de la paranoia, agregue una advertencia en tss_update_io_bitmap() para detectar el caso en el que ese código se invoca con un estado inconsistente.

References

https://git.kernel.org/stable/c/d64b7b05a827f98d068f412969eef65489b0cf03patch
https://git.kernel.org/stable/c/2dace5e016c991424a3dc6e83b1ae5dca8992d08patch
https://git.kernel.org/stable/c/aa5ce1485562f20235b4c759eee5ab0c41d2c220patch
https://git.kernel.org/stable/c/2cfcbe1554c119402e7382de974c26b0549899fepatch
https://git.kernel.org/stable/c/b3b3b6366dc8eb5b22edba9adc4bff3cdacfd64cpatch
https://git.kernel.org/stable/c/73cfcc8445585b8af7e18be3c9246b851fdf336cpatch
https://git.kernel.org/stable/c/8b68e978718f14fdcb080c2a7791c52a0d09bc6dpatch
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlmailing-list, third-party-advisory
https://lists.debian.org/debian-lts-announce/2025/10/msg00007.htmlmailing-list, third-party-advisory
https://cert-portal.siemens.com/productcert/html/ssa-082556.html

Sources

SourceRecordLicence
CVE ListCVE-2025-38100 changed 2026-11-05CVE Terms of Use
NVDCVE-2025-38100 changed 2026-11-05Public domain