mirror of
https://git.yoctoproject.org/poky
synced 2026-10-22 19:18:18 +00:00
libpcap: Fix CVE-2026-31911
NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31911 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/a715bcdde830299cba4171514385cb17ec19b6e9 (From OE-Core rev: 26ada8f7dd521e6b472078b2dac57e0e0f635048) Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
1 parent
8836026975
commit
f7b29be290
2 files changed
+48
No files matched your search
@@ -0,0 +1,47 @@
|
||||
From a715bcdde830299cba4171514385cb17ec19b6e9 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ovsienko <denis@ovsienko.info>
|
||||
Date: Thu, 30 Jul 2026 13:34:08 +0100
|
||||
Subject: [PATCH] CVE-2026-31911: Fail opcodes safely in the BPF interpreter.
|
||||
|
||||
This vulnerability has been discovered by FuzzAnything Organization.
|
||||
|
||||
The current revision of pcapint_filter_with_aux_data() calls abort() if
|
||||
the current instruction opcode is invalid, and assumes this never to be
|
||||
the case. This holds for programs that have been generated by libpcap.
|
||||
|
||||
However, this does not necessarily hold for programs that come from an
|
||||
external source via pcap_offline_filter() or [deprecated] bpf_filter().
|
||||
Furthermore, this does not necessarily hold for programs that have been
|
||||
validated by libpcap because the current revision of the validator has
|
||||
gaps in the checks and accepts a number of invalid opcodes (another
|
||||
commit addresses that).
|
||||
|
||||
Thus in pcapint_filter_with_aux_data(), when the instruction opcode is
|
||||
invalid, just reject the packet.
|
||||
|
||||
(backported from commit 4ccb54bf4946d31a248ec93bdbeaabd97fb9d8f7)
|
||||
|
||||
(cherry picked from commit a715bcdde830299cba4171514385cb17ec19b6e9)
|
||||
|
||||
Notes on backporting to 1.10.4:
|
||||
- Adapted to the 1.10.4 pcap_filter*() names (renamed to pcapint_*()
|
||||
after 1.10.4).
|
||||
- The upstream CHANGES/changelog hunk is not backported.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/a715bcdde830299cba4171514385cb17ec19b6e9]
|
||||
CVE: CVE-2026-31911
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
diff --git a/bpf_filter.c b/bpf_filter.c
|
||||
index 2ea11d46..d6e4b019 100644
|
||||
--- a/bpf_filter.c
|
||||
+++ b/bpf_filter.c
|
||||
@@ -146,7 +146,7 @@ pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_int proglen,
|
||||
switch (pc->code) {
|
||||
|
||||
default:
|
||||
- abort();
|
||||
+ return 0;
|
||||
case BPF_RET|BPF_K:
|
||||
return (u_int)pc->k;
|
||||
|
||||
@@ -19,6 +19,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \
|
||||
file://CVE-2025-11964.patch \
|
||||
file://01-CVE-2026-0799.patch \
|
||||
file://02-CVE-2026-31912.patch \
|
||||
file://03-CVE-2026-31911.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f"
|
||||
|
||||
Reference in new issue
Block a user