7.8high
tracefs: Reset permissions on remount if permissions are options
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: tracefs: Reset permissions on remount if permissions are options There's an inconsistency with the way permissions are handled in tracefs. Because the permissions are generated when accessed, they default to the root inode's permission if they were never set by the user. If the user sets the permissions, then a flag is set and the permissions are saved via the inode (for tracefs files) or an internal attribute field (for eventfs). But if a remount happens that specify the permissions, all the files that were not changed by the user gets updated, but the ones that were are not. If the user were to remount the file system with a given permission, then all files and directories within that file system should be updated. This can cause security issues if a file's permission was updated but the admin forgot about it. They could incorrectly think that remounting with permissions set would update all files, but miss some. For example: # cd /sys/kernel/tracing # chgrp 1002 current_tracer # ls -l [..] -rw-r----- 1 root root 0 May 1 21:25 buffer_size_kb -rw-r----- 1 root root 0 May 1 21:25 buffer_subbuf_size_kb -r--r----- 1 root root 0 May 1 21:25 buffer_total_size_kb -rw-r----- 1 root lkp 0 May 1 21:25 current_tracer -rw-r----- 1 root root 0 May 1 21:25 dynamic_events -r--r----- 1 root root 0 May 1 21:25 dyn_ftrace_total_info -r--r----- 1 root root 0 May 1 21:25 enabled_functions Where current_tracer now has group "lkp". # mount -o remount,gid=1001 . # ls -l -rw-r----- 1 root tracing 0 May 1 21:25 buffer_size_kb -rw-r----- 1 root tracing 0 May 1 21:25 buffer_subbuf_size_kb -r--r----- 1 root tracing 0 May 1 21:25 buffer_total_size_kb -rw-r----- 1 root lkp 0 May 1 21:25 current_tracer -rw-r----- 1 root tracing 0 May 1 21:25 dynamic_events -r--r----- 1 root tracing 0 May 1 21:25 dyn_ftrace_total_info -r--r----- 1 root tracing 0 May 1 21:25 enabled_functions Everything changed but the "current_tracer". Add a new link list that keeps track of all the tracefs_inodes which has the permission flags that tell if the file/dir should use the root inode's permission or not. Then on remount, clear all the flags so that the default behavior of using the root inode's permission is done for all files and directories.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 628adb842bd5e1c2c598534a7a022b8235289de6 before 5f91fc82794d4a6e41cdcd02d00baa377d94ca78, from 8186fff7ab649085e2c60d032d9a20a85af1d87c before 414fb08628143203d29ccd0264b5a83fb9523c03, from 8186fff7ab649085e2c60d032d9a20a85af1d87c before baa23a8d4360d981a49913841a726edede5cdd54, 9c2ac5e0ea7899411fd900d4681890722a020735, from 6.6.18 before 6.6.31, from 6.7.4 before 6.8, 6.8 Not affected: before 6.8, from 6.6.31 up to 6.6.*, from 6.8.10 up to 6.8.*, from 6.9 up to * | CVE List |
| linux linux_kernel | from 6.6.18 before 6.6.31, from 6.7.4 before 6.8.10, 6.9 | NVD |
All scores
| Linux | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA-ADP | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: tracefs: Reset permissions on remount if permissions are options There's an inconsistency with the way permissions are handled in tracefs. Because the permissions are generated when accessed, they default to the root inode's permission if they were never set by the user. If the user sets the permissions, then a flag is set and the permissions are saved via the inode (for tracefs files) or an internal attribute field (for eventfs). But if a remount happens that specify the permissions, all the files that were not changed by the user gets updated, but the ones that were are not. If the user were to remount the file system with a given permission, then all files and directories within that file system should be updated. This can cause security issues if a file's permission was updated but the admin forgot about it. They could incorrectly think that remounting with permissions set would update all files, but miss some. For example: # cd /sys/kernel/tracing # chgrp 1002 current_tracer # ls -l [..] -rw-r----- 1 root root 0 May 1 21:25 buffer_size_kb -rw-r----- 1 root root 0 May 1 21:25 buffer_subbuf_size_kb -r--r----- 1 root root 0 May 1 21:25 buffer_total_size_kb -rw-r----- 1 root lkp 0 May 1 21:25 current_tracer -rw-r----- 1 root root 0 May 1 21:25 dynamic_events -r--r----- 1 root root 0 May 1 21:25 dyn_ftrace_total_info -r--r----- 1 root root 0 May 1 21:25 enabled_functions Where current_tracer now has group "lkp". # mount -o remount,gid=1001 . # ls -l -rw-r----- 1 root tracing 0 May 1 21:25 buffer_size_kb -rw-r----- 1 root tracing 0 May 1 21:25 buffer_subbuf_size_kb -r--r----- 1 root tracing 0 May 1 21:25 buffer_total_size_kb -rw-r----- 1 root lkp 0 May 1 21:25 current_tracer -rw-r----- 1 root tracing 0 May 1 21:25 dynamic_events -r--r----- 1 root tracing 0 May 1 21:25 dyn_ftrace_total_info -r--r----- 1 root tracing 0 May 1 21:25 enabled_functions Everything changed but the "current_tracer". Add a new link list that keeps track of all the tracefs_inodes which has the permission flags that tell if the file/dir should use the root inode's permission or not. Then on remount, clear all the flags so that the default behavior of using the root inode's permission is done for all files and directories.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: tracefs: restablece los permisos al volver a montar si los permisos son opciones. Hay una inconsistencia en la forma en que se manejan los permisos en tracefs. Debido a que los permisos se generan cuando se accede a ellos, de forma predeterminada son los permisos del inodo raíz si el usuario nunca los configuró. Si el usuario establece los permisos, entonces se establece una bandera y los permisos se guardan a través del inodo (para archivos tracefs) o un campo de atributo interno (para eventfs). Pero si ocurre un reinicio que especifica los permisos, todos los archivos que no fueron modificados por el usuario se actualizan, pero los que sí no lo fueron. Si el usuario volviera a montar el sistema de archivos con un permiso determinado, entonces todos los archivos y directorios dentro de ese sistema de archivos deberían actualizarse. Esto puede causar problemas de seguridad si se actualizó el permiso de un archivo pero el administrador lo olvidó. Podrían pensar incorrectamente que volver a montar con los permisos establecidos actualizaría todos los archivos, pero perdería algunos. Por ejemplo: # cd /sys/kernel/tracing # chgrp 1002 current_tracer # ls -l [..] -rw-r----- 1 raíz raíz 0 1 de mayo 21:25 buffer_size_kb -rw-r---- - 1 raíz raíz 0 1 de mayo 21:25 buffer_subbuf_size_kb -r--r----- 1 raíz raíz 0 1 de mayo 21:25 buffer_total_size_kb -rw-r----- 1 raíz lkp 0 1 de mayo 21:25 current_tracer -rw-r----- 1 raíz raíz 0 1 de mayo 21:25 Dynamic_events -r--r----- 1 raíz raíz 0 1 de mayo 21:25 dyn_ftrace_total_info -r--r----- 1 root root 0 1 de mayo 21:25 enable_functions Donde current_tracer ahora tiene el grupo "lkp". # montar -o remontar, gid=1001. # ls -l -rw-r----- 1 rastreo de raíz 0 1 de mayo 21:25 buffer_size_kb -rw-r----- 1 rastreo de raíz 0 1 de mayo 21:25 buffer_subbuf_size_kb -r--r--- -- 1 rastreo de raíz 0 1 de mayo 21:25 buffer_total_size_kb -rw-r----- 1 rastreo de raíz 0 1 de mayo 21:25 current_tracer -rw-r----- 1 rastreo de raíz 0 1 de mayo 21:25 Dynamic_events -r--r----- 1 rastreo de raíz 0 1 de mayo 21:25 dyn_ftrace_total_info -r--r----- 1 rastreo de raíz 0 1 de mayo 21:25 enable_functions Todo cambió excepto el "current_tracer". Agregue una nueva lista de enlaces que realice un seguimiento de todos los tracefs_inodes que tienen indicadores de permiso que indican si el archivo/directorio debe usar el permiso del inodo raíz o no. Luego, al volver a montar, borre todas las banderas para que el comportamiento predeterminado de usar el permiso del inodo raíz se realice para todos los archivos y directorios.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-36963 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2024-36963 changed 2026-06-17 | Public domain |