CVE-2025-21922
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/04/2025
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ppp: Fix KMSAN uninit-value warning with bpf<br />
<br />
Syzbot caught an "KMSAN: uninit-value" warning [1], which is caused by the<br />
ppp driver not initializing a 2-byte header when using socket filter.<br />
<br />
The following code can generate a PPP filter BPF program:<br />
&#39;&#39;&#39;<br />
struct bpf_program fp;<br />
pcap_t *handle;<br />
handle = pcap_open_dead(DLT_PPP_PPPD, 65535);<br />
pcap_compile(handle, &fp, "ip and outbound", 0, 0);<br />
bpf_dump(&fp, 1);<br />
&#39;&#39;&#39;<br />
Its output is:<br />
&#39;&#39;&#39;<br />
(000) ldh [2]<br />
(001) jeq #0x21 jt 2 jf 5<br />
(002) ldb [0]<br />
(003) jeq #0x1 jt 4 jf 5<br />
(004) ret #65535<br />
(005) ret #0<br />
&#39;&#39;&#39;<br />
Wen can find similar code at the following link:<br />
https://github.com/ppp-project/ppp/blob/master/pppd/options.c#L1680<br />
The maintainer of this code repository is also the original maintainer<br />
of the ppp driver.<br />
<br />
As you can see the BPF program skips 2 bytes of data and then reads the<br />
&#39;Protocol&#39; field to determine if it&#39;s an IP packet. Then it read the first<br />
byte of the first 2 bytes to determine the direction.<br />
<br />
The issue is that only the first byte indicating direction is initialized<br />
in current ppp driver code while the second byte is not initialized.<br />
<br />
For normal BPF programs generated by libpcap, uninitialized data won&#39;t be<br />
used, so it&#39;s not a problem. However, for carefully crafted BPF programs,<br />
such as those generated by syzkaller [2], which start reading from offset<br />
0, the uninitialized data will be used and caught by KMSAN.<br />
<br />
[1] https://syzkaller.appspot.com/bug?extid=853242d9c9917165d791<br />
[2] https://syzkaller.appspot.com/text?tag=ReproC&x=11994913980000
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:*:*:*:*:*:*:*:* | 2.6.12 (including) | 5.4.291 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.235 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.179 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.131 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.83 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.19 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.13.7 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:* |
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/1eacd47636a9de5bee25d9d5962dc538a82d9f0b
- https://git.kernel.org/stable/c/2f591cb158807bdcf424f66f1fbfa6e4e50f3757
- https://git.kernel.org/stable/c/3de809a768464528762757e433cd50de35bcb3c1
- https://git.kernel.org/stable/c/4c2d14c40a68678d885eab4008a0129646805bae
- https://git.kernel.org/stable/c/4e2191b0fd0c064d37b0db67396216f2d4787e0f
- https://git.kernel.org/stable/c/8aa8a40c766b3945b40565a70349d5581458ff63
- https://git.kernel.org/stable/c/c036f5f2680cbdabdbbace86baee3c83721634d6
- https://git.kernel.org/stable/c/d685096c8129c9a92689975193e268945fd21dbf
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html



