Linux kernel permission check race in SELinux BPF tokens
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
selinux: fix BPF token permission checks
Avoid multiple lookups of the bpffs creator SID using the token's file descriptor when the same information can be found via the resolved path/dentry (in selinux_bpf_token_create()) or the token itself (in selinux_bpf_map_create() and selinux_bpf_prog_load()). Not only does this simplify the code, it avoids potential TOCTOU issues if the user changes the token file descriptor passed into the kernel.
From the CVE record · Linux
SELinux BPF token permission checks in the Linux kernel could look up the bpffs creator SID multiple times through a token file descriptor. A local user who can change that descriptor while it is being checked could trigger a potential time-of-check/time-of-use issue. The input does not specify authentication requirements beyond the ability to pass the descriptor.
Engineers running Linux kernels with SELinux BPF token support should check their versions; affected versions are not specified.