CVE-2024-36963

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.
Configurations

No configuration.

History

20 May 2025, 14:15

Type Values Removed Values Added
CWE CWE-863
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8

21 Nov 2024, 09:22

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/414fb08628143203d29ccd0264b5a83fb9523c03 - () https://git.kernel.org/stable/c/414fb08628143203d29ccd0264b5a83fb9523c03 -
References () https://git.kernel.org/stable/c/5f91fc82794d4a6e41cdcd02d00baa377d94ca78 - () https://git.kernel.org/stable/c/5f91fc82794d4a6e41cdcd02d00baa377d94ca78 -
References () https://git.kernel.org/stable/c/baa23a8d4360d981a49913841a726edede5cdd54 - () https://git.kernel.org/stable/c/baa23a8d4360d981a49913841a726edede5cdd54 -

03 Jun 2024, 14:46

Type Values Removed Values Added
Summary
  • (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.

03 Jun 2024, 08:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-06-03 08:15

Updated : 2025-05-20 14:15


NVD link : CVE-2024-36963

Mitre link : CVE-2024-36963

CVE.ORG link : CVE-2024-36963


JSON object : View

Products Affected

No product.

CWE
CWE-863

Incorrect Authorization