CVE-2024-36963
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
03/06/2024
Last modified:
17/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
tracefs: Reset permissions on remount if permissions are options<br />
<br />
There&#39;s an inconsistency with the way permissions are handled in tracefs.<br />
Because the permissions are generated when accessed, they default to the<br />
root inode&#39;s permission if they were never set by the user. If the user<br />
sets the permissions, then a flag is set and the permissions are saved via<br />
the inode (for tracefs files) or an internal attribute field (for<br />
eventfs).<br />
<br />
But if a remount happens that specify the permissions, all the files that<br />
were not changed by the user gets updated, but the ones that were are not.<br />
If the user were to remount the file system with a given permission, then<br />
all files and directories within that file system should be updated.<br />
<br />
This can cause security issues if a file&#39;s permission was updated but the<br />
admin forgot about it. They could incorrectly think that remounting with<br />
permissions set would update all files, but miss some.<br />
<br />
For example:<br />
<br />
# cd /sys/kernel/tracing<br />
# chgrp 1002 current_tracer<br />
# ls -l<br />
[..]<br />
-rw-r----- 1 root root 0 May 1 21:25 buffer_size_kb<br />
-rw-r----- 1 root root 0 May 1 21:25 buffer_subbuf_size_kb<br />
-r--r----- 1 root root 0 May 1 21:25 buffer_total_size_kb<br />
-rw-r----- 1 root lkp 0 May 1 21:25 current_tracer<br />
-rw-r----- 1 root root 0 May 1 21:25 dynamic_events<br />
-r--r----- 1 root root 0 May 1 21:25 dyn_ftrace_total_info<br />
-r--r----- 1 root root 0 May 1 21:25 enabled_functions<br />
<br />
Where current_tracer now has group "lkp".<br />
<br />
# mount -o remount,gid=1001 .<br />
# ls -l<br />
-rw-r----- 1 root tracing 0 May 1 21:25 buffer_size_kb<br />
-rw-r----- 1 root tracing 0 May 1 21:25 buffer_subbuf_size_kb<br />
-r--r----- 1 root tracing 0 May 1 21:25 buffer_total_size_kb<br />
-rw-r----- 1 root lkp 0 May 1 21:25 current_tracer<br />
-rw-r----- 1 root tracing 0 May 1 21:25 dynamic_events<br />
-r--r----- 1 root tracing 0 May 1 21:25 dyn_ftrace_total_info<br />
-r--r----- 1 root tracing 0 May 1 21:25 enabled_functions<br />
<br />
Everything changed but the "current_tracer".<br />
<br />
Add a new link list that keeps track of all the tracefs_inodes which has<br />
the permission flags that tell if the file/dir should use the root inode&#39;s<br />
permission or not. Then on remount, clear all the flags so that the<br />
default behavior of using the root inode&#39;s permission is done for all<br />
files and directories.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.18 (including) | 6.6.31 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7.4 (including) | 6.8.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc6:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/414fb08628143203d29ccd0264b5a83fb9523c03
- https://git.kernel.org/stable/c/5f91fc82794d4a6e41cdcd02d00baa377d94ca78
- https://git.kernel.org/stable/c/baa23a8d4360d981a49913841a726edede5cdd54
- https://git.kernel.org/stable/c/414fb08628143203d29ccd0264b5a83fb9523c03
- https://git.kernel.org/stable/c/5f91fc82794d4a6e41cdcd02d00baa377d94ca78
- https://git.kernel.org/stable/c/baa23a8d4360d981a49913841a726edede5cdd54



