Skip to content

CVE-2025-21922 ppp: Fix KMSAN uninit-value warning with bpf

MediumCVSS 5.5 EPSS 0.30%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
Linux KernelUbuntuDebian

Description

In the Linux kernel, the following vulnerability has been resolved:

ppp: Fix KMSAN uninit-value warning with bpf

Syzbot caught an "KMSAN: uninit-value" warning [1], which is caused by the
ppp driver not initializing a 2-byte header when using socket filter.

The following code can generate a PPP filter BPF program:
'''
struct bpf_program fp;
pcap_t *handle;
handle = pcap_open_dead(DLT_PPP_PPPD, 65535);
pcap_compile(handle, &fp, "ip and outbound", 0, 0);
bpf_dump(&fp, 1);
'''
Its output is:
'''
(000) ldh [2]
(001) jeq #0x21 jt 2 jf 5
(002) ldb [0]
(003) jeq #0x1 jt 4 jf 5
(004) ret #65535
(005) ret #0
'''
Wen can find similar code at the following link:
https://github.com/ppp-project/ppp/blob/master/pppd/options.c#L1680
The maintainer of this code repository is also the original maintainer
of the ppp driver.

As you can see the BPF program skips 2 bytes of data and then reads the
'Protocol' field to determine if it's an IP packet. Then it read the first
byte of the first 2 bytes to determine the direction.

The issue is that only the first byte indicating direction is initialized
in current ppp driver code while the second byte is not initialized.

For normal BPF programs generated by libpcap, uninitialized data won't be
used, so it's not a problem. However, for carefully crafted BPF programs,
such as those generated by syzkaller [2], which start reading from offset
0, the uninitialized data will be used and caught by KMSAN.

[1] https://syzkaller.appspot.com/bug?extid=853242d9c9917165d791
[2] https://syzkaller.appspot.com/text?tag=ReproC&x=11994913980000

Upgrade path

11 packages: 11 fixed.

PackageAffectedFixed inStatus
azure linux kernel(Azure Linux 3.0) < 6.6.85.1-2 6.6.85.1-2 Fixed
cbl-mariner kernel(CBL-Mariner 2.0) < 5.15.180.1-1 5.15.180.1-1 Fixed
debian/linux(Debian 12) < 6.1.133-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +33 more 6.1.133-1 Fixed
debian/linux(Debian 13) < 6.12.19-1 6.12.19-1 Fixed
debian/linux(Debian 14) < 6.12.19-1 6.12.19-1 Fixed
Linux kernel < 5.4.291; < 5.10.235; < 5.15.179; < 6.1.131 +25 more 1eacd47636a9de5bee25d9d5962dc538a82d9f0b, 2f591cb158807bdcf424f66f1fbfa6e4e50f3757, 3de809a768464528762757e433cd50de35bcb3c1, 4c2d14c40a68678d885eab4008a0129646805bae, 4e2191b0fd0c064d37b0db67396216f2d4787e0f, 5.4.291, 5.10.235, 5.15.179, 6.1.131, 6.6.83, 6.12.19, 6.13.7, 6.14, 8aa8a40c766b3945b40565a70349d5581458ff63, c036f5f2680cbdabdbbace86baee3c83721634d6, d685096c8129c9a92689975193e268945fd21dbf Fixed
ubuntu/linux(Ubuntu 22.04) < 5.15.0-140.150 5.15.0-140.150 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-84.84 6.8.0-84.84 Fixed
ubuntu/linux-kvm(Ubuntu 22.04) < 5.15.0-1080.85 5.15.0-1080.85 Fixed
ubuntu/linux-raspi(Ubuntu 22.04) < 5.15.0-1078.81 5.15.0-1078.81 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1039.43 6.8.0-1039.43 Fixed

Affected products

ProductAffected versionsFixed in
cbl-mariner kernel(CBL-Mariner:2.0) < 5.15.180.1-1 5.15.180.1-1
azure linux kernel(Azure Linux:3.0) < 6.6.85.1-2 6.6.85.1-2
debian/linux(Debian:12) < 6.1.133-1 6.1.133-1
debian/linux(Debian:12) = 6.1.106-1 No fix listed
debian/linux(Debian:12) = 6.1.106-2 No fix listed
debian/linux(Debian:12) = 6.1.106-3 No fix listed
debian/linux(Debian:12) = 6.1.112-1 No fix listed
debian/linux(Debian:12) = 6.1.115-1 No fix listed
debian/linux(Debian:12) = 6.1.119-1 No fix listed
debian/linux(Debian:12) = 6.1.123-1 No fix listed
debian/linux(Debian:12) = 6.1.124-1 No fix listed
debian/linux(Debian:12) = 6.1.128-1 No fix listed
debian/linux(Debian:12) = 6.1.129-1 No fix listed
debian/linux(Debian:12) = 6.1.27-1 No fix listed
debian/linux(Debian:12) = 6.1.37-1 No fix listed
debian/linux(Debian:12) = 6.1.38-1 No fix listed
debian/linux(Debian:12) = 6.1.38-2 No fix listed
debian/linux(Debian:12) = 6.1.38-2~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.38-3 No fix listed
debian/linux(Debian:12) = 6.1.38-4 No fix listed
debian/linux(Debian:12) = 6.1.38-4~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.52-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.64-1 No fix listed
Show 50 more
ProductAffected versionsFixed in
debian/linux(Debian:12) = 6.1.66-1 No fix listed
debian/linux(Debian:12) = 6.1.67-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.76-1 No fix listed
debian/linux(Debian:12) = 6.1.76-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.82-1 No fix listed
debian/linux(Debian:12) = 6.1.85-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.94-1 No fix listed
debian/linux(Debian:12) = 6.1.94-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.98-1 No fix listed
debian/linux(Debian:12) = 6.1.99-1 No fix listed
debian/linux(Debian:13) < 6.12.19-1 6.12.19-1
debian/linux(Debian:14) < 6.12.19-1 6.12.19-1
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < d685096c8129c9a92689975193e268945fd21dbf d685096c8129c9a92689975193e268945fd21dbf
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2f591cb158807bdcf424f66f1fbfa6e4e50f3757 2f591cb158807bdcf424f66f1fbfa6e4e50f3757
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 4e2191b0fd0c064d37b0db67396216f2d4787e0f 4e2191b0fd0c064d37b0db67396216f2d4787e0f
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3de809a768464528762757e433cd50de35bcb3c1 3de809a768464528762757e433cd50de35bcb3c1
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 1eacd47636a9de5bee25d9d5962dc538a82d9f0b 1eacd47636a9de5bee25d9d5962dc538a82d9f0b
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 8aa8a40c766b3945b40565a70349d5581458ff63 8aa8a40c766b3945b40565a70349d5581458ff63
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < c036f5f2680cbdabdbbace86baee3c83721634d6 c036f5f2680cbdabdbbace86baee3c83721634d6
Linux kernel >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 4c2d14c40a68678d885eab4008a0129646805bae 4c2d14c40a68678d885eab4008a0129646805bae
Linux kernel = 2.6.12 No fix listed
Linux kernel < 5.4.291 5.4.291
Linux kernel < 5.10.235 5.10.235
Linux kernel < 5.15.179 5.15.179
Linux kernel < 6.1.131 6.1.131
Linux kernel < 6.6.83 6.6.83
Linux kernel < 6.12.19 6.12.19
Linux kernel < 6.13.7 6.13.7
Linux kernel < 6.14 6.14
ubuntu/linux(Ubuntu:22.04) < 5.15.0-140.150 5.15.0-140.150
ubuntu/linux-kvm(Ubuntu:22.04) < 5.15.0-1080.85 5.15.0-1080.85
ubuntu/linux-raspi(Ubuntu:22.04) < 5.15.0-1078.81 5.15.0-1078.81
ubuntu/linux(Ubuntu:24.04) < 6.8.0-84.84 6.8.0-84.84
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1039.43 6.8.0-1039.43
Linux kernel >= 2.6.12, < 5.4.291 5.4.291
Linux kernel >= 5.5, < 5.10.235 5.10.235
Linux kernel >= 5.11, < 5.15.179 5.15.179
Linux kernel >= 5.16, < 6.1.131 6.1.131
Linux kernel >= 6.2, < 6.6.83 6.6.83
Linux kernel >= 6.7, < 6.12.19 6.12.19
Linux kernel >= 6.13, < 6.13.7 6.13.7
Linux kernel = 6.14-rc1 No fix listed
Linux kernel = 6.14-rc2 No fix listed
Linux kernel = 6.14-rc3 No fix listed
Linux kernel = 6.14-rc4 No fix listed
Linux kernel = 6.14-rc5 No fix listed

References