Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.
Reach libpcap · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
libpcap BPF interpreter calls abort() if it encounters a BPF instruction that has an invalid opcode. In particular uncommon use cases a crafted filter program can terminate the OS process.
Published 2026-09-05NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
The vulnerable code is in the image: pcapint_filter_with_aux_data() in bpf_filter.c still calls abort() on an unknown opcode, and this build applies no libpcap patches.
Nothing shipped can hand it an invalid opcode, though. Every libpcap consumer in the image (tcpdump, nmap, nfbpf_compile) builds its filter with pcap_compile() from a text expression, and tcpdump and nmap then install it with pcap_setfilter(), which rejects any program that fails pcapint_validate_filter(). nfbpf_compile only prints the bytecode. The only direct bpf_filter() caller, pppd's demand filter, is compiled out.
The one management-interface path is the CLI tcpdump <iface> expression <expr> command, which passes a filter expression, not raw BPF instructions. Reaching the abort() would need a root or shell user running their own program that calls bpf_filter() or pcap_offline_filter() with hand-built instructions, and that would only kill their own process. It is not reachable from the network.
Evidence 12
The interpreter's `switch (pc->code)` has `default: abort();`, so the unfixed code is present in the built source.
output/build/libpcap-1.10.6/bpf_filter.c:109-112
The file is empty (0 lines), and there is no `patches/libpcap/` directory or patch in `buildroot/package/libpcap/`, so no backport is applied.
output/build/libpcap-1.10.6/.applied_patches_list
`BR2_PACKAGE_LIBPCAP=y`; it is selected by `BR2_PACKAGE_TCPDUMP=y` (`output/.config:3494`, `configs/x86_64_defconfig:96`) and also used by `nmap`, `iptables` and `ulogd`.
output/.config:2710
`PLATFORM_C_SRC='pcap-linux.c fad-getad.c'` with usbmon and netfilter modules; `bpf_filter.c` is core and always compiled into `usr/lib/libpcap.so.1.10.6`.
output/build/libpcap-1.10.6/config.log:2339
`pcapint_install_bpf_program()` rejects any program failing `pcapint_validate_filter()` with "BPF program is not valid".
output/build/libpcap-1.10.6/optimize.c:2959-2970
`pcapint_validate_filter()` returns 0 for unknown opcodes in every instruction class (`default: return 0;`).
output/build/libpcap-1.10.6/bpf_filter.c:407-524
Linux live-capture `pcap_setfilter` calls `pcapint_install_bpf_program()` first; the userland interpreter call at `pcap-linux.c:4281` only ever sees validated programs. Savefile, usbmon and netfilter handles use the same setfilter op (`savefile.c:565`, `pcap-usb-linux.c:483`, `pcap-netfilter-linux.c:596`).
output/build/libpcap-1.10.6/pcap-linux.c:4622
`tcpdump` only uses `pcap_compile()` followed by `pcap_setfilter()`; it has no call to `bpf_filter()` or `pcap_offline_filter()`.
output/build/tcpdump-4.99.5/tcpdump.c:2276,2381
`nmap` likewise uses `pcap_compile()` then `pcap_setfilter()` (also `libnetutil/netutil.cc:4087-4089`), linking the system library (`LIBPCAP_LIBS='-lpcap'` in `output/build/nmap-7.95/config.log:1020`).
output/build/nmap-7.95/nsock/src/nsock_pcap.c:111-117
`PPP_WITH_FILTER` is undefined (`# BR2_PACKAGE_PPPD_FILTER is not set`, `output/.config:3444`), so the direct `bpf_filter()` calls in `pppd/demand.c:337-339` are not compiled.
output/build/pppd-2.5.2/pppd/config.h:170
`ENABLE_REMOTE` is undefined, so `rpcapd` and remote capture, the only network path that accepts raw BPF programs, are not built.
output/build/libpcap-1.10.6/config.h:14
The CLI `tcpdump` command runs `doas tcpdump -ln ... -i <iface> <expr>` with a text filter expression only; no finit service under `board/common/rootfs/etc/finit.conf` or `finit.d/` starts `tcpdump`, `nmap` or `ulogd`.
src/klish-plugin-infix/xml/infix.xml:1178-1197
Version and patches
libpcap 1.10.6 is the shipped version (buildroot/package/libpcap/libpcap.mk, LIBPCAP_VERSION = 1.10.6), and its CHANGES has no entry for this fix. The source still has default: abort(); at bpf_filter.c:111-112, and no patches are applied (.applied_patches_list is empty).
I could not fetch the upstream fix commit a715bcdde830299cba4171514385cb17ec19b6e9 or an advisory from this offline tree, so the exact affected range and first fixed release are not confirmed here. The CVE description matches the code present.
Recommendation
Document as not exposed; no urgent backport is needed. Pick up the fix with the next routine libpcap bump in Buildroot, or backport upstream commit a715bcdde830299cba4171514385cb17ec19b6e9 as patches/libpcap/ if a release is wanted sooner.
Re-evaluate if BR2_PACKAGE_PPPD_FILTER, libpcap remote capture (--enable-remote / rpcapd), or any new package calling bpf_filter() or pcap_offline_filter() directly is ever enabled.
Open questions
The upstream commit and advisory were not readable offline, so the fixed version and the exact "uncommon use cases" upstream has in mind are inferred from the CVE text and the source.
I checked source for the libpcap consumers named in Buildroot metadata and enabled in output/.config (tcpdump, nmap, iptables, ulogd, pppd). A search of output/build for direct bpf_filter() / pcap_offline_filter() callers found only pppd (compiled out) and nmap's unused bundled libpcap copy. I did not inspect the final rootfs for binaries linking libpcap.so.
Two search commands were blocked by the sandbox and re-run in a simpler form; no coverage was lost.
Members of Kernel Kit decide. Sign in if you are one.