bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-6244

5.5medium

libpcap1.10.6 · 1.10.5in 4 of 4 releases

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 for the 'div #k' and 'mod #k' ALU instructions does not check whether the immediate value is zero. In particular uncommon use cases a crafted filter program can cause a division by zero.

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

References 1
Review Av26.10.0x86_64Not exposedFable 5.2 · medium confidence · 2026-11-19

The unfixed interpreter is in the image: output/build/libpcap-1.10.6/bpf_filter.c executes div #k and mod #k with no zero check, and this build applies no patches to libpcap.

The interpreter does run on a device (for example from the CLI tcpdump command), but only on programs that have already had a zero immediate rejected. The filter compiler refuses a constant zero divisor, and pcapint_install_bpf_program() validates every program before it is installed. A zero immediate can only reach the interpreter if a program calls bpf_filter() or pcap_offline_filter() directly with a hand-built, unvalidated BPF program.

No libpcap consumer in the image does that, as far as I could check. tcpdump, nmap/nping and hostapd only use pcap_compile() followed by pcap_setfilter(). pppd, the one package with direct bpf_filter() calls, is built --without-pcap.

Triggering the bug would therefore need a custom program linked against libpcap.so and run from a shell on the device. It is not reachable from a network interface, YANG, the CLI or the web UI.

Evidence 12
  1. The `BPF_ALU|BPF_DIV|BPF_K` and `BPF_ALU|BPF_MOD|BPF_K` cases do `A /= pc->k` and `A %= pc->k` with no zero check, whereas the `BPF_X` cases at lines 287-297 do check. The vulnerable code is present.

    output/build/libpcap-1.10.6/bpf_filter.c:337-343

  2. The file is 0 bytes, so no patches were applied to libpcap. `buildroot/package/libpcap/` holds only `Config.in`, `libpcap.hash` and `libpcap.mk`, and no libpcap patch exists under `patches/` or `package/`.

    output/build/libpcap-1.10.6/.applied_patches_list

  3. `BR2_PACKAGE_LIBPCAP=y`: the target package is selected. `BR2_PACKAGE_TCPDUMP=y` (`output/.config:3494`, `configs/x86_64_defconfig:96`) and `BR2_PACKAGE_NMAP=y` (`output/.config:3411`) are among its consumers.

    output/.config:2710

  4. Configured with `--with-pcap=linux`. `bpf_filter.c` is a core source with no feature switch, so the interpreter is always compiled into `libpcap.so`.

    output/build/libpcap-1.10.6/config.log:7

  5. `pcapint_validate_filter()` rejects any `BPF_DIV` or `BPF_MOD` instruction with `BPF_K` source and `k == 0`.

    output/build/libpcap-1.10.6/bpf_filter.c:462-470

  6. `pcapint_install_bpf_program()` calls `pcapint_validate_filter()` and fails with "BPF program is not valid" before a program is stored in `p->fcode`. Both the savefile path (`savefile.c:565`) and the Linux live path (`pcap-linux.c:4622`) install filters through it.

    output/build/libpcap-1.10.6/optimize.c:2959-2970

  7. The filter expression compiler raises "division by zero" / "modulus by zero" for a constant zero divisor. `optimize.c:802-808` and `optimize.c:1302-1305` do the same during constant folding, so `pcap_compile()` output cannot contain `div #0` or `mod #0`.

    output/build/libpcap-1.10.6/gencode.c:8170-8173

  8. `pcap_offline_filter()` passes a caller-supplied program straight to `pcapint_filter()` without validation, as does `bpf_filter()` at `bpf_filter.c:534`. These are the only unvalidated entry points.

    output/build/libpcap-1.10.6/pcap.c:4346-4352

  9. `tcpdump` only uses `pcap_compile()` then `pcap_setfilter()`. A grep of the tcpdump, nmap, iptables, lldpd and hostapd build trees found no call to `pcap_offline_filter()` or libpcap's `bpf_filter()`.

    output/build/tcpdump-4.99.5/tcpdump.c:2276,2381

  10. `pppd` is configured `--without-pcap` and `BR2_PACKAGE_PPPD_FILTER` is not set (`output/.config:3444`), so the direct `bpf_filter()` calls in `pppd/demand.c:337-339` are not built.

    output/build/pppd-2.5.2/config.log:7

  11. The CLI `tcpdump` command runs `doas tcpdump -ln ... -i $KLISH_PARAM_iface $KLISH_PARAM_expr`. The operator supplies a filter expression string, not a raw BPF program, so it goes through the compiler and the validator.

    src/klish-plugin-infix/xml/infix.xml:1178-1196

  12. A grep for `tcpdump`, `nmap` and `nping` found no match, so no service in the factory-default configuration starts these libpcap consumers.

    board/common/rootfs/etc/finit.d

Version and patches

libpcap 1.10.6 is the version NVD names, and the tree's source matches the description: the div #k and mod #k cases have no zero check. I could not read the upstream fix commit 98bb921b141aa642faedbf2ac510541c76499a19 (no network access), so the exact affected range and fixed release are unconfirmed. The build applies no patches (.applied_patches_list is empty) and Buildroot has no LIBPCAP_IGNORE_CVES entry. The fix is not present.

Recommendation

Document as not exposed; no urgent backport is needed. Pick up the fix with the next routine libpcap bump to a release containing upstream commit 98bb921b141aa642faedbf2ac510541c76499a19.

Re-check this finding if a package that calls bpf_filter() or pcap_offline_filter() on externally supplied BPF programs is added to the image, or if BR2_PACKAGE_PPPD_FILTER is enabled.

Open questions

The upstream fix commit and its affected/fixed version range could not be read from this tree.

I grepped the tcpdump, nmap, pppd, iptables, lldpd and hostapd build trees for direct interpreter calls. I did not check wpa_supplicant or every other package under output/build/, so a consumer that links libpcap without a Buildroot select could have been missed. I also did not confirm that hostapd actually uses its pcap l2_packet backend in this build.

One command in the review was blocked by the sandbox. I re-ran its checks individually, except a listing of the top-level patches/ directory, which I replaced with a name search for *pcap* under patches/ and package/ (no matches).

Members of Kernel Kit decide. Sign in if you are one.