CVE-2021-47608
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
19/06/2024
Last modified:
31/10/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bpf: Fix kernel address leakage in atomic fetch<br />
<br />
The change in commit 37086bfdc737 ("bpf: Propagate stack bounds to registers<br />
in atomics w/ BPF_FETCH") around check_mem_access() handling is buggy since<br />
this would allow for unprivileged users to leak kernel pointers. For example,<br />
an atomic fetch/and with -1 on a stack destination which holds a spilled<br />
pointer will migrate the spilled register type into a scalar, which can then<br />
be exported out of the program (since scalar != pointer) by dumping it into<br />
a map value.<br />
<br />
The original implementation of XADD was preventing this situation by using<br />
a double call to check_mem_access() one with BPF_READ and a subsequent one<br />
with BPF_WRITE, in both cases passing -1 as a placeholder value instead of<br />
register as per XADD semantics since it didn&#39;t contain a value fetch. The<br />
BPF_READ also included a check in check_stack_read_fixed_off() which rejects<br />
the program if the stack slot is of __is_pointer_value() if dst_regno
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.12 (including) | 5.15.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



