From patchwork Wed Oct 14 14:38:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100693 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 008E4CC6B2A for ; Wed, 14 Oct 2026 14:39:06 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.39]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15335.1791988742928670165 for ; Wed, 14 Oct 2026 07:39:04 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=O/C1ICOa; spf=pass (domain: est.tech, ip: 40.107.162.39, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pM7p3z7sO+OehTg/bfxIymIpLBkG2EstbvrPGMeTeMpQ2fauZ++Txnos8ug9sfMPYIFYIGqhCo7Oowhh6FgJHj3oZH3/gUHNH1yV3acc3rjZKQpRhV4y8ZsL26d2uEb/Qu3CZH4AS4ko/qu4vcfUge9vMpYE32wlC8jXRH1jDdSp8Y+a8bm/WFfHHbBrGwyX2G+EbGgtl6zYfpmk7TZQWQ9CfTHp/cBX/IAMY3EtOyTTTHM/U24Qke7eYYWKoPuVSH9cSwh/MOVguSFUTDLutmwfl6QSr9ea2vDxIlvz2mIyBoUQwLy4qSReF5VpFPTCGmjOhnCWRSTH7CAV9WEPrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cH+zcMqk1ajB96GrQinmdPTW4q2mgzwuUslk5e8B++o=; b=kxRmQHGiHQDJDXM/wacbkWb2+ca3Yh7w4nz9KDezOg4O42jqz+IumE+JghwdcoJFCnwJ4fpaKrVV1KLzylFri4bFdWiJOgRgu1PSXKISmjj0CVnxEKxTaIym680RXTvCVYvmhjVyvFSyyrM6QiDdFOdV34Hf2O9MslAbbvVlRPdMmzm/Ujn5zHAc9dBZmrBFZ/5UomfAEIq02RLm5qSqQU7bkeldONHxOZbMhL2tcep9DdVDFHd8IpWXKQrufr4Sfxz2p1QaADYoGfm6lWTCuFN0XwF/MNvkk85P84/lV2Y4W1cxEERtekIl3AVYm2d0QJJU/5cRg8O+986tyfGe2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cH+zcMqk1ajB96GrQinmdPTW4q2mgzwuUslk5e8B++o=; b=O/C1ICOaS+2js3bAfW7LhTXTp1/g62rMFem43kEQXPQcplL28WyynW5MA8RaqLJ4SPA+Kp1TuZkce+PAqqznb6Nf3cyOWj9Tq30x7NEnRSuPNOlxNmGQ/qDZUY/11MesI57XiGWKhHjtwR11LF3WPYSoViUWCDxjqcORLijkJLhHiuMmR/uMjLayGMUgK2jwf27+w3yJvg6F+bPhRKyyjiPTmnuZgSaPgW14xcQMyiGFWZkiOR73f1TQloqaPYa7IQXZl0+14KOzLGiBiNtBcE16275fusGNoVyBNA4A4roNqzV1FE9eoqvG3zzjNaPc6iHHBoxkBFymOXRb1x5vmA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:38:59 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:38:59 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 1/7] libpcap: Fix CVE-2026-0799 Date: Wed, 14 Oct 2026 16:38:50 +0200 Message-ID: <20261014143856.74426-2-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DUZPR01CA0224.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b4::20) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: eef4d022-9e59-48f7-b8ee-08df2a00e26a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|3023799007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: L2SRstWmTcNXTEHjbiracpOD8hBo9UwIe+C81oX//8LVqrV+dGaZKMGegVtFSEMTUfFwGFBTR8hWhkPrJuvBVJNaEjvnHhaa1Z2ErZqtJ8PZjkQvixN47KQ3LPdeqt9lsuNEuNBlhZ5R5NIXb+nvA/qIo2joXibGVeW98JS5VWOHwz42s64xRguTfXMvnTHPRx1aurFl1y5uOWa89ij82ObN6DMJwyiJQuakuMIyxEns9ksrH0YUpIeb6sgiG+8mMUZ2S1/HPBrfd8b1JQTKrr+7yx2ws72cdH2rxfQkvsxwkt0aV3zeRPaM1qNs989pmZFT4wThostKncxLaM/d8YlLFr1M3qp6zfAbjhbkHCHeWV3WTzkUmcw40LUIknBo/Q+luQcFNYyIrKUfQeFcq96i4j4o+Rg+Y2LBxsxabD+wuxsdgGNpb6eF65BlJLj9F5h212R7kScTTyOemoGuIu4iZLmF/K3rbop7JgvQ6sjas1WKSs2gicQCIwm2J72bOhGEuxADDDMBTwJFNLYUkjCKyQuVkBxjkoxHanqNv72SNHOi1VImAvTyhLjnvpFhX/7cqatOnrR5jd2DghQlMFrp1JoKKr1i+WSRS+ImKRkVhLDbAXLJCWKKtJ8/OsIg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(3023799007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aypo69/f5X+hvI6oDZwUtn8/Bj0x0ivh8umqgB7AkyeqiIhaui31qJmPny14Syh1jRBPRGqbXjpZ2vl26G7LvKjrp8CTM4g/jJdzB6ut77vx2dmGNKFhKkxWOLGChRTpmTlxAhX36beUj26y2tW0cMVqxvtJlhDh/E5D7Lvj86+VKzhvyxlSBNQJQ1gGMeNLmMjzXYWLhOtA+I7xRKZrF9ayqbYFiyePbRMtwEGEUTuPAihiQf0D81kWS1rczW+nImWIaSlHihYg58enfKwhdHDN41H61Jj+BuvzD/aQKvvisb5DvEMyUz66WEWJsuq7nqrRRnI/SBXl2zCt8GKORRgJHD8bLVjlfRp+ij8knvFgdHelyQGRDBCmmV9Y7iX0glwqR1elxqceUfiy6pSnMu3bfH2xlBgLO0fsXJLl5CAEtG5lvZ9qhc59akC8yD/gpcSiriaausoFrB7dFCAhwXYzAc25lnSj5lXAGU93J30WkjUFibnLIz+Y6WZ/fLDuQKY36eK5+ZL8Be7Tmn82RIocddoydVqqQSZPUn0riZuGPjEYBFbKHRLF+9IRPmYxCedDn+q+EMaQbF1DAMxRhGlO6tMxFidODl55biOKH3Rh+nyBWbRyKL8JjQTgqRmttOEEarU8owfpu1jcXwhttI/dN5rR7Tx0ObE6Yj3bPd/9bQuH6ROs3ogKMKM0Yd5yc/9lt+6TcQDGm5cxsh/4CKzSDgPK3wJTa5Wwu5/YyueRnWOXPT/mMsU8flZriiNCQYY5NneWFQ6etcxLjzjpRUetRmWLR8aRiGXVTjSoithr2KbFDAmcuxRChBsaDrDCIbjqZ82Pkgml9mJmBVaUuU/JzVqRqum6erUgkjd0WtETwRFTZk+6zHKmXIIWrytTcC/f3YFgnkUsbRTBAeUYufLJbEba5lSVU6c7MdWaecyRihYH2EsIfjBjbKMWFmhkRWJlivO+9oEF7QHV/XuQaltHKY+5eZ0k5Cz1NLm0wIl2I+7R+w8jjDammDmaC1la31N1m62hVf76kPju+Nv7pSeRK3EWayRg4/ic+kNNIR6UoKPZn2C2hyZ3twlTxC2VctpY3MKQnLZSBUED//081JEz8yfUwBioCkM4fJQ5qVtcsckB3SEZri6Sap1DRP33EvWiOOxJg+Qf4ShHi7omYUr7eIP/TqC/y6EGegJwhFdCkJPe3Mz4eWuWb/0QCwCcs6MzO23CaDjhtx60taLqRbaxFF2jiCn4KRjxy5vovkbGGHRE3EDLEfBb2qE3t9r9ryieF6iMW05vUnWe8mXz1+uA1C+5DG5TQeAMTybZMZE1Tm7E9IrMPicgfE9MsGk1yOzEhkLD+P9cZvA6PJlf5+3lgniiEQcC7DKpBqqX5rd+nfq+WUVEcn4gpqMFCy2R9/2cqLEkB4nTNeKzlC0cMQkYevJoVmrJ9gbBoYR6HfBr3LTtEyLTyOSBMkfyPCh2YpopG5qQH1upgP7Vq25ZCGxBIbLdbWiYhHskVDtVhoV5ryNKQFbPEo8k9898k2rjDakHtocsQyWIGEc5rqhnRhTeu3TAK9KRG7NaHTtganpQouz+jIYs1DJUV9E6VOcXQbRq8/dW5Z7u3RASqwUCnnDsLaFS6SA3tSOygJYFxVYjVwQ5iLr1kcDjlM79rDsmIe5iWLGflbqtxFT8bCfsU2YH9t/mXFVmnKJGQM4HP1O9/mLttVhZ0SiEbgff4L/vYnGtdSeNxR8hkP5KuWgmLw== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: eef4d022-9e59-48f7-b8ee-08df2a00e26a X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:38:59.8098 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: no/TlIsKFV2M0i3Sgx7heBKejs61LK5LTG4lndH8ut0YhuY83AXnBSy+RDxmU33Zu6YKwKxcc8rnYVCVLYRUoqS7v3W225S1bltNHA9IzKY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247767 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-0799 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/48e8960a7108e9e828f9d7bdc7e97bdab841aec7 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/01-CVE-2026-0799.patch | 67 +++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 68 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/01-CVE-2026-0799.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/01-CVE-2026-0799.patch b/meta/recipes-connectivity/libpcap/libpcap/01-CVE-2026-0799.patch new file mode 100644 index 0000000000..a4dfea4236 --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/01-CVE-2026-0799.patch @@ -0,0 +1,67 @@ +From 48e8960a7108e9e828f9d7bdc7e97bdab841aec7 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Thu, 30 Jul 2026 13:33:41 +0100 +Subject: [PATCH] CVE-2026-0799: Access M[] safely in the BPF interpreter. + +Include Security identified and reported this problem as a potential +vulnerability in 2018 (case reference "I7"). Their work was sponsored +by Mozilla under the Secure Open Source program. The vulnerability has +been independently confirmed only recently. + +The current revision of pcapint_filter_with_aux_data() can, but does not +check whether a scratch memory register index is valid in the "ld M[k]", +"ldx M[k]", "st M[k]" and "stx M[k]" BPF instructions, and assumes this +is always the case. This holds for programs that have been generated or +validated by libpcap. + +However, this does not necessarily hold for programs that come via +pcap_offline_filter() or [deprecated] bpf_filter() from an external +source and have not been explicitly validated. If the interpreter +executes such a program with an invalid index, it will read/write the +process memory at arbitrary locations starting at the current stack +frame. Depending on the address, the memory layout and the OS, this can +result in stack buffer overflow, SIGSEGV, SIGBUS or other effects. To +fix this, in the interpreter reject the packet if the index is invalid. + +(backported from commit 569f8fd3524192acbabf93c9cd704471bb38f84a) + +(cherry picked from commit 48e8960a7108e9e828f9d7bdc7e97bdab841aec7) + +Notes on backporting to 1.10.4: + - The upstream CHANGES/changelog hunk is not backported. + +Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/48e8960a7108e9e828f9d7bdc7e97bdab841aec7] +CVE: CVE-2026-0799 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/bpf_filter.c b/bpf_filter.c +index 8691d0d1..fa82d1d0 100644 +--- a/bpf_filter.c ++++ b/bpf_filter.c +@@ -219,18 +219,26 @@ DIAG_ON_DEFAULT_ONLY_SWITCH + continue; + + case BPF_LD|BPF_MEM: ++ if (pc->k >= BPF_MEMWORDS) ++ return 0; + A = mem[pc->k]; + continue; + + case BPF_LDX|BPF_MEM: ++ if (pc->k >= BPF_MEMWORDS) ++ return 0; + X = mem[pc->k]; + continue; + + case BPF_ST: ++ if (pc->k >= BPF_MEMWORDS) ++ return 0; + mem[pc->k] = A; + continue; + + case BPF_STX: ++ if (pc->k >= BPF_MEMWORDS) ++ return 0; + mem[pc->k] = X; + continue; + diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index ee7d7540f6..692fdf606c 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -17,6 +17,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://CVE-2025-11961-01.patch \ file://CVE-2025-11961-02.patch \ file://CVE-2025-11964.patch \ + file://01-CVE-2026-0799.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f" From patchwork Wed Oct 14 14:38:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100694 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3603CC6B1D for ; Wed, 14 Oct 2026 14:39:05 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.39]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15335.1791988742928670165 for ; Wed, 14 Oct 2026 07:39:04 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=hD6cutZF; spf=pass (domain: est.tech, ip: 40.107.162.39, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eDaDJXzeXrAQymLZmFtljSDFsfKldCV0VTGkllHnGyQeE+MqOeXDt6KJByyqPVxvwDfxtwsGL1/MntQjSsppvQSJN5g0MmJ6PJYJUlUxQwEHpMtdvqqFa9+/P6lBC3PHx1PByrY9fYvdlmOx4Mn3fyryXTkEgx/k+G1LA1C1zPNO/CzedVOkWNL1rGInhNBIU6GnkPr52Yh2HG5JcdaOs7tBcmhyNM8FEFuQpvurPhBQWkdnTNIpWxgqkJyd43sqmFxZWouZtFuyFIYAZLjU4WTQe0/dDliXlQTyifBj17KsrZC64r5dZVMrVRespSBmSbsLeJl9Kg8rBxHqJiO/jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tDs8DSoxWA/jbmZtQIy/JtadiZwzq0sUNBaXp/9MG7g=; b=J8qo0+y48r+uBr9ln8pEknwGNIccoVKYbba0KVvB5Dd4Aj3bq4DucZuh5e97Ut4N4JSh4Fhyy7qrZkIH0bl/7kYOjH6uKMxiNAanUl0H8UbIgq0FHxdkJXopJl4xalpCgC46REbqqk0J10UqqWKLNyv5/RHUl7In+CGaAECzcDJJ5gOCRuNgSQ6EAqXUFaTBp2o+clpX5NrY8Zco+BdMTlkR0iO/5k/Fdl4C9Ef2PUXtgaOCCLNSxP3DXgp22Jf+rKCMfuRWhLlcZReyG1UuQkq/zDjGgHgUh/arD1UqlMAF0wzIqTay7L8v4u9I4Dbk1O7N2X+xFO+7bjXESKk9TA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tDs8DSoxWA/jbmZtQIy/JtadiZwzq0sUNBaXp/9MG7g=; b=hD6cutZFrfoTaINjCOeUDrRCFL/qvpErkzG7sX2BX/gR/p/nIuHN5j84kG2m+uA/8Uwxd+2PWpUb1eLVkKHQOOFLeYYUo+19rTULJ8UQkspyXermYGs70Eb0Zt6os4SIGLQ9NWwVHiZyt93gDw1iyuk/dLc8cE8eau0amND8UV3j3e72Q6csNIHGov3w3DYpwx+oshAuctXW/ykIaLsX9IC01aZ5f4VqZJSrCR2HPaLWCxfXEgm7BriLXmxJSjI5m+2oDzrnUAkOvRI1/Vketh9zKIJB6yH/W2YrrG5bgLWbgRjSVje0tqygr/Vez8TldBmYnf1KkNGQtU6tUggyQw== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:01 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:01 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 2/7] libpcap: Fix CVE-2026-31912 Date: Wed, 14 Oct 2026 16:38:51 +0200 Message-ID: <20261014143856.74426-3-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DU6P191CA0039.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53f::13) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: bd8c4a53-a8bf-452b-b1fb-08df2a00e38c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|3023799007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: q3eWoh2p1Xa6G3zm++onx7gSJDBXqTghb+6bNr8AF6v49sl+r8eycoVPhzmtNhr0pggKOdVmmywCNptlhq/A3VLdJmBASN4ejCurIRXySr70dLnMlusrqTbVE8zfrBIwfpA12SI8+6k6ZuQ1PhJrVoUO8EWPh1FzIiC3vxwBgTscE4yd7rGV6ZZhPuvjfVI3yhNaPyVbVlLitKvhRj/98QMGb7oCvlsS7Z1Rt7GetC6m5htKQhl+Rzbgbd5X94JxyDUIedod/PF4nEGLIk9I3vlXoAIbcjAAaTOM47Db/KrmzXj8hGBox/QMreMx+LjZ9pjBHXCbu0tMB6KXUBwTqjRbgIYmtnAxM7CQEtW08XLT7K41tcDRieevJP7GTOQ8xRlrafCQY9a+F9jlZx6I+bP73Kleeb7+5Ank00ewssp5mutee0FqYtkHRwB14/qLoVOU9mXYTSYAtJMBQm9cbVBE8Q2XRDInSAtHX+xYzfKbYjAeFe47CRkKVhFYy4v6rKY4fNroFJWVJzBRhTLTWuQjbyfL2kB6B3AHcRNoW/1KkIIImxs6r3+TwKt3y2KTSOUQsaFnV3kPA8zVbdwYj0YY8PSuXPP31RXZnH2ikVo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(3023799007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q38sNyG+gaTgJaUZk3Y088jytClv7YBV6zzK3s8xu5veeBbmdSf7O2EbpVYB30vLi6aUCFyDRDjR2aoc6o7MzJSD4rN/ac1UM+u6YUDis8pRc5IaqdHdUJG5zW97V23Wo8EqSXT58P+IFqdy2IqJfOK9+8zJJjT5KWgPTAynZKJ5ci9qZBz2bZjrIl6ENOZNhQIWp1RgeBJ88k1cOQKCRojrQjyOvZGUkS856xa4IJEGsJK/DEet9yaO504lOasAqHPruJRRVstjn2M98gKoWkHvvXkotPHAAKIxlj+FtSf31EiN7PoTuQHemjASCpA7lG5Ggfnbqzr/Loka4+ztTOq+yrhGJNuJQfz1RnXnhbzG5IU7Z/u1x6HPKZ6d+snwqy4Tbhh6V59c4QPTdHON7icVRQDMnSNP02Ml3P6hqJ1OXQOKb1uNEyKGmvL7NZxDh2KoYUoJ/EqlVjvsEMy1JV9Ye9141hNgJ3y9u5xE17J2ASDu8lIdHwT7GKLUAJYl822Ntp2/BJOw7fX8fOAoThQPqk/0a7INRJ/e2ldvjJ/3xgAwWmXm3j7g6ZgtS1y3xvUyq10OUC5/nlkhaqC3ZXkO00wesvd6aWzNZZ6ylJQLv5JMwz9aTtq62Ly0tlgoDEO5SRq/2+aOnXg2lgGtp382qg6wXIs6ooBLzH6iOQGrMyD8eZU7u7d5fCkp4azqHAS18HLTS6rwNphI+ijQgsg3Xnk3dcIwVNxDys7HCNiVs3jCgiQ4dslgoK6pdx/vOb1aa7tUH3Stbkjvcd820zavVX6Evlsz5RupFJogbR4PiBl4k1WzoW5QwMu53gls0AQudDPoT+K8584VdnxCbFygqIkaeF5fLoEyo/jGGgYPpFIx4DwfsTC2uwyFlmLNjIOOqvdtgfdad4RQQZ7hRdDiRz/lenXB1hoPaMCWVKWLmgYRCpk+qxLwa/Ljk+9gKHfPA5k4sOEVfMd0QH/3LG3EwUtyyKFEyLYtxfU/8Ih9BF7DBQGd0RmolUxPNd2VS6Lmjq6NuS/Q8z+S/wzERORX9iFtUS4gOQ4VoYPCCBdzhry7HWUPc2u8DtUdcd6br0enclWjNXa9U2M6SXK5Gz/dDGMpg42CJl0jn6Q92/y2R243R4fa1jhorJcp1ELRB6/kcoXGUgEoIp4kRSk9TlUI3A6xo/Ia9QeQ4A1ev+B+2BOQ34SaeRcR81TpNcfUu9WntmQQMRmKakuzryjbl/wOII52OMmhiANivHtf7ze4qEE/Pj6HBwNlNfHH8TWIM3bVORPjPIsPO3Fnr4PTLhtjfmwF+TP9vwqg13Mh6/4KoUjQ+B7mNY121w50l6QbPj3dI23rg6IfYAq3gSZu+q99LiGaQHoqwgqrgoAdWVGnOOIsVAgJE9t0W1kDzoMlpDJ76He9mHZYKY1RAJmLZEBfbg4uPZWvOUcEJSu/kHjnjX+McdJBBS9Jt3Y5+aTIcjobCdI30mJy+l2vIg43jdBh9PJhArDXAHCGrivImYyUWmTjZ61cZJSnFGCd2b+OLGbnqdQ7KQD22pLCOJ+LF9Zuw5Zx5JjW6yD2b7Ui6Sh8vK4EhO/q0R+jTcLj6ATuUpiKyaSto+0i9TwGe6T4h+xsuw9gXCjRAyRUKtrTIqqaDy3M+w2ilWwyQ/Q1dHNJatVxYXlFV9Ho1M9UhoxFDOnoJ24ejJzcQ94Aze7m2SAU30WdYDYWwuxmjkZEyyxUx4lW88iEJAI/wcb+bCDjTw== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: bd8c4a53-a8bf-452b-b1fb-08df2a00e38c X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:01.7425 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ewpkWkw2RriV1LXNKSFV+lP5PLiyu9QrRWX4b+sVvdql1VxDmFyIo3ua6ee2wXZ42D1jVTF2opxEBifgAy4aJsH8Ke2wDrpuNI7DTmzbW+o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247768 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31912 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/02-CVE-2026-31912.patch | 591 ++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 592 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/02-CVE-2026-31912.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/02-CVE-2026-31912.patch b/meta/recipes-connectivity/libpcap/libpcap/02-CVE-2026-31912.patch new file mode 100644 index 0000000000..1118287040 --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/02-CVE-2026-31912.patch @@ -0,0 +1,591 @@ +From d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Thu, 30 Jul 2026 13:33:55 +0100 +Subject: [PATCH] CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). + +The current revision of pcapint_filter_with_aux_data() does not know the +number of instructions in the filter program, it assumes the program +counter always remains within the bounds of the provided filter program +and always reaches a return instruction. This holds for programs that +have been generated or validated by libpcap. + +However, this does not necessarily hold for programs that come from an +external source via pcap_offline_filter() or [deprecated] bpf_filter() +and have not been explicitly validated. If the interpreter executes +such a program and advances the program counter beyond the last +instruction, it will be interpreting memory space after the filter +program as BPF instructions, which in the current implementation will +eventually cause either abort() (another commit addresses that) or +SIGSEGV. + +To fix the latter problem, in pcapint_filter_with_aux_data() add a +parameter for the number of instructions in the program and reject the +packet as soon as (or just before) the program counter goes out of +bounds. Update all incoming code paths to specify the length; also in +pcap_offline_filter(3PCAP) make it clear the function now requires the +'bf_len' member to be set correctly and uses it. + +(backported from commit d1209988c74dd9330659898d3b676ee6bbe1c551) + +(cherry picked from commit d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9) + +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 pcap-haiku.c hunk is applied to pcap-haiku.cpp instead + (the Haiku module was rewritten from C++ to C after 1.10.4). + - The upstream CHANGES/changelog hunk is not backported. + +Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9] +CVE: CVE-2026-31912 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/bpf_filter.c b/bpf_filter.c +index fa82d1d0..dec336ea 100644 +--- a/bpf_filter.c ++++ b/bpf_filter.c +@@ -72,6 +72,24 @@ enum { + BPF_S_ANC_VLAN_TAG_PRESENT, + }; + ++/* ++ * Kernel BPF implementations tend to define BPF_MAXINSNS to 512 or 4096, the ++ * userland interpreter in libpcap is meant to support much longer filter ++ * programs. In the latter case it is important that BPF_MAXINSNS does not ++ * interfere with the safety checks in the validator and the interpreter: ++ * (BPF_MAXINSNS + UINT8_MAX) * sizeof(struct bpf_insn) < UINT32_MAX ++ * It makes the most sense to be able to interpret as many instructions as ++ * pcap_compile() can produce, without optimization, for a valid filter ++ * expression before it consumes as much memory as the current definitions of ++ * NCHUNKS and CHUNKSIZE() allow. For some expressions this can be almost ++ * 1.53 million instructions on a 64-bit machine and twice as many on a 32-bit ++ * machine. ++ */ ++#ifdef BPF_MAXINSNS ++#undef BPF_MAXINSNS ++#endif ++#define BPF_MAXINSNS 3060000U ++ + /* + * Execute the filter program starting at pc on the packet p + * wirelen is the length of the original packet +@@ -86,12 +104,14 @@ enum { + */ + #if defined(SKF_AD_VLAN_TAG_PRESENT) + u_int +-pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, +- u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data) ++pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_int proglen, ++ const u_char *p, const u_int wirelen, const u_int buflen, ++ const struct pcap_bpf_aux_data *aux_data) + #else + u_int +-pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, +- u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data _U_) ++pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_int proglen, ++ const u_char *p, const u_int wirelen, const u_int buflen, ++ const struct pcap_bpf_aux_data *aux_data _U_) + #endif + { + register uint32_t A, X; +@@ -101,13 +121,36 @@ pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, + if (pc == 0) + /* + * No filter means accept all. ++ * In this case the value of 'proglen' is irrelevant. + */ + return (u_int)-1; ++ if (proglen < 1 || proglen > BPF_MAXINSNS) ++ return 0; ++ ++ /* ++ * Require the current instruction pointer not to overflow for both the ++ * filter program (where the pointer will be dereferenced) and an ++ * immediately following margin (where it will be not). So long as the ++ * margin is large enough to represent the destination of any single ++ * conditional [forward] jump from within the filter program, a single ++ * guard prevents all filter program over-read attempts that result ++ * from the program running out of instructions before a BPF_RET or a ++ * conditional jump directing the interpreter beyond the program end. ++ * Unconditional jumps mean a larger problem space, which the BPF_JA ++ * case below addresses separately. ++ */ ++ const struct bpf_insn *pcend = pc + proglen; ++ if (pcend + UINT8_MAX < pc) ++ return 0; ++ + A = 0; + X = 0; ++ const struct bpf_insn *pc0 = pc; + --pc; + for (;;) { + ++pc; ++ if (pc >= pcend) ++ return 0; + switch (pc->code) { + + default: +@@ -243,6 +286,40 @@ DIAG_ON_DEFAULT_ONLY_SWITCH + continue; + + case BPF_JMP|BPF_JA: ++ /* ++ * The pointer (pc) decrements and increments in units ++ * of sizeof(struct bpf_insn) == 8 bytes. The number ++ * of units is in the [INT32_MIN, INT32_MAX] interval, ++ * hence the result can point before the beginning or ++ * beyond the end of the filter program and can under- ++ * or overflow; also on 32-bit architectures it can ++ * under- or overflow more than once and can test ++ * negative for underflow, overflow and out-of-range ++ * conditions after under- or overflowing at least ++ * once. ++ * ++ * However, it has been verified above that the program ++ * length is sufficiently small and the pointer does ++ * not wrap within the bounds of the filter program, so ++ * there is a one-to-one correspondence between BPF ++ * program counter values [0, proglen) and all valid ++ * values of the pointer. In other words, after this ++ * unconditional jump the pointer arithmetic result ++ * will be valid iff BPF program counter value will be ++ * valid. For the latter problem the solution is ++ * almost the same as in the validator. ++ * ++ * The main difference is that here the current value ++ * of BPF program counter is not a 32-bit unsigned ++ * variable, but a ptrdiff_t expression, which is ++ * 64-bit signed on 64-bit architectures and 32-bit ++ * signed on 32-bit architectures. However, the cast ++ * to 32-bit unsigned is safe in both cases because: ++ * pc0 <= pc < pc0 + proglen, therefore: ++ * 0 <= pc - pc0 < proglen <= BPF_MAXINSNS < INT32_MAX ++ */ ++ if ((bpf_u_int32)(pc - pc0) + 1 + pc->k >= proglen) ++ return 0; + /* + * XXX - we currently implement "ip6 protochain" + * with backward jumps, so sign-extend pc->k. +@@ -396,10 +473,10 @@ DIAG_ON_DEFAULT_ONLY_SWITCH + } + + u_int +-pcap_filter(const struct bpf_insn *pc, const u_char *p, u_int wirelen, +- u_int buflen) ++pcap_filter(const struct bpf_insn *pc, const u_int proglen, const u_char *p, ++ u_int wirelen, u_int buflen) + { +- return pcap_filter_with_aux_data(pc, p, wirelen, buflen, NULL); ++ return pcap_filter_with_aux_data(pc, proglen, p, wirelen, buflen, NULL); + } + + /* +@@ -419,7 +496,7 @@ pcap_validate_filter(const struct bpf_insn *f, int len) + u_int i, from; + const struct bpf_insn *p; + +- if (len < 1) ++ if (len < 1 || (u_int)len > BPF_MAXINSNS || f + len < f) + return 0; + + for (i = 0; i < (u_int)len; ++i) { +@@ -485,33 +562,45 @@ pcap_validate_filter(const struct bpf_insn *f, int len) + case BPF_JMP: + /* + * Check that jumps are within the code block, +- * and that unconditional branches don't go +- * backwards as a result of an overflow. ++ * regardless of the direction. libpcap uses ++ * backward jumps to implement the "protochain" ++ * primitive. All offsets that mean a backward ++ * jump in libpcap (whether in-range or not) in ++ * kernel BPF implementations mean out-of-range ++ * or overflow forward jumps -- kernel ++ * implementations must reject that. ++ * + * Unconditional branches have a 32-bit offset, + * so they could overflow; we check to make + * sure they don't. Conditional branches have + * an 8-bit offset, and the from address is <= +- * BPF_MAXINSNS, and we assume that BPF_MAXINSNS ++ * BPF_MAXINSNS, and we know that BPF_MAXINSNS + * is sufficiently small that adding 255 to it + * won't overflow. + * + * We know that len is <= BPF_MAXINSNS, and we +- * assume that BPF_MAXINSNS is < the maximum size ++ * know that BPF_MAXINSNS is < the maximum value + * of a u_int, so that i + 1 doesn't overflow. +- * +- * For userland, we don't know that the from +- * or len are <= BPF_MAXINSNS, but we know that +- * from <= len, and, except on a 64-bit system, +- * it's unlikely that len, if it truly reflects +- * the size of the program we've been handed, +- * will be anywhere near the maximum size of +- * a u_int. We also don't check for backward +- * branches, as we currently support them in +- * userland for the protochain operation. + */ + from = i + 1; + switch (BPF_OP(p->code)) { + case BPF_JA: ++ /* ++ * So long as both 'from' and bpf_insn.k are ++ * 32-bit unsigned, this check rejects any jump ++ * offset that points outside of the valid BPF ++ * address space of the filter program no ++ * matter whether signed interpretation of the ++ * offset is positive or negative. ++ * ++ * Note that this condition is necessary, but ++ * not sufficient to get correct results from ++ * respective pointer arithmetic in the process ++ * address space. Other necessary conditions ++ * are that BPF_MAXINSNS is correctly defined ++ * and enforced, and that the pointer does not ++ * overflow. ++ */ + if (from + p->k >= (u_int)len) + return 0; + break; +@@ -539,12 +628,14 @@ pcap_validate_filter(const struct bpf_insn *f, int len) + + /* + * Exported because older versions of libpcap exported them. ++ * This function is deprecated and unsafe, use pcap_offline_filter() instead. + */ + u_int + bpf_filter(const struct bpf_insn *pc, const u_char *p, u_int wirelen, + u_int buflen) + { +- return pcap_filter(pc, p, wirelen, buflen); ++ // The actual length of the filter program is not known. ++ return pcap_filter(pc, BPF_MAXINSNS, p, wirelen, buflen); + } + + int +diff --git a/dlpisubs.c b/dlpisubs.c +index 6815b0ec..790acf28 100644 +--- a/dlpisubs.c ++++ b/dlpisubs.c +@@ -195,7 +195,8 @@ pcap_process_pkts(pcap_t *p, pcap_handler callback, u_char *user, + bufp += caplen; + #endif + ++pd->stat.ps_recv; +- if (pcap_filter(p->fcode.bf_insns, pk, origlen, caplen)) { ++ if (pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ pk, origlen, caplen)) { + #ifdef HAVE_SYS_BUFMOD_H + pkthdr.ts.tv_sec = sbp->sbh_timestamp.tv_sec; + pkthdr.ts.tv_usec = sbp->sbh_timestamp.tv_usec; +diff --git a/pcap-bpf.c b/pcap-bpf.c +index 2898e598..04b5620d 100644 +--- a/pcap-bpf.c ++++ b/pcap-bpf.c +@@ -1255,7 +1255,8 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_handler callback, u_char *user) + #endif + */ + if (pb->filtering_in_kernel || +- pcap_filter(p->fcode.bf_insns, datap, bhp->bh_datalen, caplen)) { ++ pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ datap, bhp->bh_datalen, caplen)) { + struct pcap_pkthdr pkthdr; + #ifdef BIOCSTSTAMP + struct bintime bt; +diff --git a/pcap-bt-linux.c b/pcap-bt-linux.c +index c7bfef1d..dcf3b575 100644 +--- a/pcap-bt-linux.c ++++ b/pcap-bt-linux.c +@@ -394,7 +394,8 @@ bt_read_linux(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_char + pkth.caplen+=sizeof(pcap_bluetooth_h4_header); + pkth.len = pkth.caplen; + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ pktd, pkth.len, pkth.caplen)) { + callback(user, &pkth, pktd); + return 1; + } +diff --git a/pcap-bt-monitor-linux.c b/pcap-bt-monitor-linux.c +index 206e65b5..3f9d5b49 100644 +--- a/pcap-bt-monitor-linux.c ++++ b/pcap-bt-monitor-linux.c +@@ -151,7 +151,8 @@ bt_monitor_read(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_ch + bthdr->opcode = htons(hdr.opcode); + + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ pktd, pkth.len, pkth.caplen)) { + callback(user, &pkth, pktd); + return 1; + } +diff --git a/pcap-dag.c b/pcap-dag.c +index f261ead0..c3fe1dbd 100644 +--- a/pcap-dag.c ++++ b/pcap-dag.c +@@ -668,8 +668,9 @@ dag_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) + caplen = p->snapshot; + + /* Run the packet filter if there is one. */ +- if ((p->fcode.bf_insns == NULL) || pcap_filter(p->fcode.bf_insns, dp, packet_len, caplen)) { +- ++ if (p->fcode.bf_insns == NULL || ++ pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ dp, packet_len, caplen)) { + /* convert between timestamp formats */ + register unsigned long long ts; + +diff --git a/pcap-dbus.c b/pcap-dbus.c +index 506f150f..760bb9ba 100644 +--- a/pcap-dbus.c ++++ b/pcap-dbus.c +@@ -91,7 +91,8 @@ dbus_read(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_char *us + + gettimeofday(&pkth.ts, NULL); + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, (u_char *)raw_msg, pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ (u_char *)raw_msg, pkth.len, pkth.caplen)) { + handlep->packets_read++; + callback(user, &pkth, (u_char *)raw_msg); + count++; +diff --git a/pcap-dpdk.c b/pcap-dpdk.c +index 025a6748..cc31d2f2 100644 +--- a/pcap-dpdk.c ++++ b/pcap-dpdk.c +@@ -407,7 +407,9 @@ static int pcap_dpdk_dispatch(pcap_t *p, int max_cnt, pcap_handler cb, u_char *c + + } + if (bp){ +- if (p->fcode.bf_insns==NULL || pcap_filter(p->fcode.bf_insns, bp, pcap_header.len, pcap_header.caplen)){ ++ if (p->fcode.bf_insns==NULL || ++ pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ bp, pcap_header.len, pcap_header.caplen)){ + cb(cb_arg, &pcap_header, bp); + }else{ + pd->bpf_drop++; +diff --git a/pcap-haiku.cpp b/pcap-haiku.cpp +index 8ae9119c..3d34220c 100644 +--- a/pcap-haiku.cpp ++++ b/pcap-haiku.cpp +@@ -85,8 +85,8 @@ pcap_read_haiku(pcap_t* handle, int maxPackets _U_, pcap_handler callback, + + // run the packet filter + if (handle->fcode.bf_insns) { +- if (pcap_filter(handle->fcode.bf_insns, buffer, bytesReceived, +- captureLength) == 0) { ++ if (pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ buffer, bytesReceived, captureLength) == 0) { + // packet got rejected + return 0; + } +diff --git a/pcap-int.h b/pcap-int.h +index 894e74af..11ca3c56 100644 +--- a/pcap-int.h ++++ b/pcap-int.h +@@ -619,13 +619,15 @@ struct pcap_bpf_aux_data { + * Filtering routine that takes the auxiliary data as an additional + * argument. + */ +-u_int pcap_filter_with_aux_data(const struct bpf_insn *, +- const u_char *, u_int, u_int, const struct pcap_bpf_aux_data *); ++u_int pcap_filter_with_aux_data(const struct bpf_insn *, const u_int, ++ const u_char *, const u_int, const u_int, ++ const struct pcap_bpf_aux_data *); + + /* + * Filtering routine that doesn't. + */ +-u_int pcap_filter(const struct bpf_insn *, const u_char *, u_int, u_int); ++u_int pcap_filter(const struct bpf_insn *, const u_int, const u_char *, ++ u_int, u_int); + + /* + * Routine to validate a BPF program. +diff --git a/pcap-linux.c b/pcap-linux.c +index 13bd8529..b2b2ca70 100644 +--- a/pcap-linux.c ++++ b/pcap-linux.c +@@ -3993,6 +3993,7 @@ static int pcap_handle_packet_mmap( + aux_data.vlan_tag = tp_vlan_tci & 0x0fff; + + if (pcap_filter_with_aux_data(handle->fcode.bf_insns, ++ handle->fcode.bf_len, + bp, + tp_len, + snaplen, +diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c +index 2eb0fc8c..5b5f5c18 100644 +--- a/pcap-netfilter-linux.c ++++ b/pcap-netfilter-linux.c +@@ -259,8 +259,8 @@ netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_c + + gettimeofday(&pkth.ts, NULL); + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, payload, pkth.len, pkth.caplen)) +- { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ payload, pkth.len, pkth.caplen)) { + handlep->packets_read++; + callback(user, &pkth, payload); + count++; +diff --git a/pcap-netmap.c b/pcap-netmap.c +index 27d36e5b..bcfd6e93 100644 +--- a/pcap-netmap.c ++++ b/pcap-netmap.c +@@ -81,7 +81,8 @@ pcap_netmap_filter(u_char *arg, struct pcap_pkthdr *h, const u_char *buf) + const struct bpf_insn *pc = p->fcode.bf_insns; + + ++pn->rx_pkts; +- if (pc == NULL || pcap_filter(pc, buf, h->len, h->caplen)) ++ if (pc == NULL || ++ pcap_filter(pc, p->fcode.bf_len, buf, h->len, h->caplen)) + pn->cb(pn->cb_arg, h, buf); + } + +diff --git a/pcap-npf.c b/pcap-npf.c +index 99b5981e..a4364353 100644 +--- a/pcap-npf.c ++++ b/pcap-npf.c +@@ -682,7 +682,8 @@ pcap_read_npf(pcap_t *p, int cnt, pcap_handler callback, u_char *user) + */ + if (pw->filtering_in_kernel || + p->fcode.bf_insns == NULL || +- pcap_filter(p->fcode.bf_insns, datap, bhp->bh_datalen, caplen)) { ++ pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ datap, bhp->bh_datalen, caplen)) { + #ifdef ENABLE_REMOTE + switch (p->rmt_samp.method) { + +diff --git a/pcap-rdmasniff.c b/pcap-rdmasniff.c +index d63ca898..c8763b33 100644 +--- a/pcap-rdmasniff.c ++++ b/pcap-rdmasniff.c +@@ -172,7 +172,8 @@ rdmasniff_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *u + pktd = (u_char *) handle->buffer + wc.wr_id * RDMASNIFF_RECEIVE_SIZE; + + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ pktd, pkth.len, pkth.caplen)) { + callback(user, &pkth, pktd); + ++priv->packets_recv; + ++count; +diff --git a/pcap-snf.c b/pcap-snf.c +index fe9cc9c8..16ce9c8e 100644 +--- a/pcap-snf.c ++++ b/pcap-snf.c +@@ -192,7 +192,8 @@ snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) + caplen = p->snapshot; + + if ((p->fcode.bf_insns == NULL) || +- pcap_filter(p->fcode.bf_insns, req.pkt_addr, req.length, caplen)) { ++ pcap_filter(p->fcode.bf_insns, p->fcode.bf_len, ++ req.pkt_addr, req.length, caplen)) { + hdr.ts = snf_timestamp_to_timeval(req.timestamp, p->opt.tstamp_precision); + hdr.caplen = caplen; + hdr.len = req.length; +diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c +index 726e4a8a..44b2bf30 100644 +--- a/pcap-usb-linux.c ++++ b/pcap-usb-linux.c +@@ -735,8 +735,8 @@ usb_read_linux_bin(pcap_t *handle, int max_packets _U_, pcap_handler callback, u + pkth.ts.tv_usec = info.hdr->ts_usec; + + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, handle->buffer, +- pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ handle->buffer, pkth.len, pkth.caplen)) { + handlep->packets_read++; + callback(user, &pkth, handle->buffer); + return 1; +@@ -904,8 +904,8 @@ usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_ch + pkth.ts.tv_usec = hdr->ts_usec; + + if (handle->fcode.bf_insns == NULL || +- pcap_filter(handle->fcode.bf_insns, (u_char*) hdr, +- pkth.len, pkth.caplen)) { ++ pcap_filter(handle->fcode.bf_insns, handle->fcode.bf_len, ++ (u_char*) hdr, pkth.len, pkth.caplen)) { + handlep->packets_read++; + callback(user, &pkth, (u_char*) hdr); + packets++; +diff --git a/pcap.c b/pcap.c +index ef1bbb71..9ee83f98 100644 +--- a/pcap.c ++++ b/pcap.c +@@ -4179,7 +4179,7 @@ pcap_offline_filter(const struct bpf_program *fp, const struct pcap_pkthdr *h, + const struct bpf_insn *fcode = fp->bf_insns; + + if (fcode != NULL) +- return (pcap_filter(fcode, pkt, h->len, h->caplen)); ++ return (pcap_filter(fcode, fp->bf_len, pkt, h->len, h->caplen)); + else + return (0); + } +diff --git a/pcap_offline_filter.3pcap b/pcap_offline_filter.3pcap +index dbb6e966..406604dc 100644 +--- a/pcap_offline_filter.3pcap ++++ b/pcap_offline_filter.3pcap +@@ -17,7 +17,7 @@ + .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + .\" +-.TH PCAP_OFFLINE_FILTER 3PCAP "7 April 2014" ++.TH PCAP_OFFLINE_FILTER 3PCAP "12 March 2026" + .SH NAME + pcap_offline_filter \- check whether a filter matches a packet + .SH SYNOPSIS +@@ -46,10 +46,35 @@ points to the + structure for the packet, and + .I pkt + points to the data in the packet. ++.PP ++In the ++.B \%bpf_program ++structure the ++.B \%bf_insns ++member is either ++.B NULL ++(which means to reject all packets) or points to an array of one or more ++.B \%struct bpf_insn ++elements, in which case the ++.B \%bf_len ++member must be set to the number of elements (this is what ++.BR \%pcap_compile () ++produces). ++.PP ++The filter program must have been compiled for a link-layer header type ++that matches the packet data; also on Linux the filter must not use ++BPF extensions, see ++.BR \%pcap_compile () ++for more information. + .SH RETURN VALUE + .BR pcap_offline_filter () + returns the return value of the filter program. This will be zero if + the packet doesn't match the filter and non-zero if the packet matches + the filter. ++.SH BACKWARD COMPATIBILITY ++.PP ++In libpcap releases before 1.10.7 this function ignored the provided ++.B \%bf_len ++value. + .SH SEE ALSO + .BR pcap (3PCAP) +diff --git a/savefile.c b/savefile.c +index db8a3aa0..e9708b23 100644 +--- a/savefile.c ++++ b/savefile.c +@@ -687,7 +687,8 @@ pcap_offline_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) + * and, if it passes, process it. + */ + if ((fcode = p->fcode.bf_insns) == NULL || +- pcap_filter(fcode, data, h.len, h.caplen)) { ++ pcap_filter(fcode, p->fcode.bf_len, ++ data, h.len, h.caplen)) { + (*callback)(user, &h, data); + n++; /* count the packet */ + if (n >= cnt) diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index 692fdf606c..323cca3d98 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -18,6 +18,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://CVE-2025-11961-02.patch \ file://CVE-2025-11964.patch \ file://01-CVE-2026-0799.patch \ + file://02-CVE-2026-31912.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f" From patchwork Wed Oct 14 14:38:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100697 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C776BCC6B2D for ; Wed, 14 Oct 2026 14:39:16 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15337.1791988748056411672 for ; Wed, 14 Oct 2026 07:39:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=KthuLjY9; spf=pass (domain: est.tech, ip: 52.101.70.53, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dqQEPC7XZIQdxpjH3wQMEW6zRJAnqcrJDslu3LPtjezbSyPwfv+N0JvY0V1nGfS2ikrZ/AyuEZhsMt8yOfSat9ap78adR5lhlavJRZEn80efjV3h2BkQ80SECjzAMec9oycS7bRwJBgp8OUMfhb0K/f31gHP6tZQxFFSgGP0BWAvoC16S5moh/zUICOg3OKvSHlXCD5Ab1Fgsa2LwS4vqtSMo94PcetMuETdqvSnmcCzSTnVzstmJODdG4G9SyjUQG9bFDm9KS5ZHEEguubWDFN2JIJDN4c/7ftgd9bXO/8MZ/NDNLhzvU8lF5hRF29GaMc/pgI9PIL6uUOqZzTWFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xgt16AUjbcgDnzDRzB8XHQ62KaxkiO2TMQRLb1suBos=; b=toZG4H/1FCCisN+AVZnm4RNaZjP5O7FUulk8z71L7WDLmi2Hb1RDA6Y1UIMlcsGcqWoAoxqyzkS8AGgl46IH9G/xigYz35S2Qrp42iTWwQNX+gOT2jrVOI2R80PcbfUjuZV7wWlxk6sZ+eWqhC4bdvW4TnNv24b/peQOKQvriUGhLwzOTLqaUa6mJw+gUDAWTieRJsMRBBSC4LSP59VoytJ5kF/3X5wkROOuH4k17WHTfYWOgCHTXQ1hVC0WiM1WpiD/OJ78ZbPhMHYo6BM2l4zc+xHGWGKqq2eTKU194L1+frucplE7P72R7exk+1BC6SZ3/psvGk88Hiti27fDXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xgt16AUjbcgDnzDRzB8XHQ62KaxkiO2TMQRLb1suBos=; b=KthuLjY9KhXXdnW/IrkxiSak65dl+E2vfpZlcp1LcgLAK2dD2l2I6y3FuaYLdOaog2BPfU45BwtaU6gSzNCiOhAVEpi3EgMbJWd/fyi/XjNKPZoz1XMGGEjvLJA9I5EqToavfgNCIJ+zOuGSTQmpFz6Dle/JwcpBI25GVQdxmck/SBw/3gF8+PI6b399iYxMD3q+XQQPADD3Yu/m8RqOQhWNE0qYHBWpAXrDcIdy8g+ynMYoFoFSo3nzs1dSM4/kfV5rS0IoO/bYshGafl9b4yuii2DbOed8aoxxSuwUO9E4Y8l/JHxw/HfZbBTtYRgkMhjLX5a82miee2784O3ePw== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:04 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:04 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 3/7] libpcap: Fix CVE-2026-31911 Date: Wed, 14 Oct 2026 16:38:52 +0200 Message-ID: <20261014143856.74426-4-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DU2PR04CA0345.eurprd04.prod.outlook.com (2603:10a6:10:2b4::16) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: 225c8b8e-6c47-483a-a880-08df2a00e519 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|3023799007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: 58SPMAGJZcunXklsBnPkp7Gi0WWH+/3mwM0INPxsdlSOaexu2lYf0aLrheukLgoK72JSzVwfU2cVjD/hmk3P4jitnPxScn6Rb6HSPgcm9EC9lQrCJ2Fyj6qfYpZKe/hpodmVb5cpmtl0+1LolspizVofqMzDWZhS17ctXGspMdKNH4vXGiGHa3GA8mbvD7H597s0f5q7kv3gSinMB9DbysVLSf8vcN+957awxZn+fBfqbfz4AoerJj526vtdLfBzaeMtkiy1y15orBj/vSPu21KwyaM50OiCsvV9I2jDhlcYq90hT4kPirycWhG9CYR688tjadtjdnQtc5H7rWWqGbtQntyfsxrDbaw62z+B1srveq3lgOt31TmGOUuZASFNpFzSKtL1in+HHZt+SGzuCrQmWhcyjd/XNHXgro7lhPM6IhwzjjlGmhXtIsBkAsPBzS7to5d95SzYE5lbR+nHB77hpE8mRRimAm37NysBPGRyd85REHpj+lYXziz112MHblT0LbP2hsAsIv7N/y1pXTFw2Bq4D5oT7ejZDy/eIVt+Nv2f+x3wjIo3d1hg0V7ANQCnL8diGr3863qL9JgnNl6BnwpxDAEWZXcu6nLyp3o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(3023799007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /6ldgA89wWo8hnLdQTyrhVbj/7Sex00AV7S8U7AJdZxRuvi5WDoDzrlzO+daoDxzZYvGcK0XftFJXDCio2vn8vY3XZL/ObOMvxdHNj1K6DD2dSf1X3S0UqIkz0TqTE/1S26rBFUigIDo9Z6iKf7UN7S7MyT/rkFvZu+8cce936R3Hu6DMXyNl4UANWxQCJ2TvKZ+ly4cPLnlkiQF94H7QAfbDja3bQWMlPLnL9WeOLATd7ttPYltKduW5Kj19O4q3o/1Gxeg+EnN1IdS9Gv4XhJBqX3AZ1eCGCCZHn4141Vki3XOCgJZWs1LlaXmAwRw9GhcpmTYS0vcLq8e47MRFlc6xd5k/PlXGxQziOooIgIQ6CVfUkGw9ObjLcabNu5BKJEG73pxz9Puf85wCI/kkphd8iBv2LZaQxqTRrQV9W70L7EE74rdMj9mri+fUxxZVuNhS6Di0Va9Wl3GOP/z4hl7Zs4Gitks167Af7grrilD1PZtVEk6TgA6SKPHYbzQc5bcP4AQXvxdmm7cwjL630e46wLUmCVQYMAjeL1u5G4+RsdtedGuj3QeQcTb8ZTBL20eQhyqOG/+m/pqijT0ZVpDr/Q0th5W3f8WdZb+ds4HyB742hOQEkR2Jxm5C/kpaA6HomGGtjdLfsDnKJNrpqy9C2IHhyYE329ucxmsi5n5Whr65ij3YlYZtF4jlNhyt9FxHXp1io1ugKEZ9hnkMG5n3p9A+OotfiLj4T71wToHJjB74lEN0oN3LjIVU5T0J3YKXmkUPBhj3TUzg+esixwME7mAxlUuyIAZjZqGkK3dRTYYDB6yj/fFFETM5x4Aow/gqktehnBwvQ/coRJQ/S5VKf/T11hknpqUAcSUoMWoi58GStkTOn+yJrUl5BKK0BdCJ8Khi1T5wU+O8c/w81NQTP/Uk8vFMoZbUALf5vDd1o2AyI14xSlCjlMhWXVY/gR4vaKsOx6V8UWkLbViPggdDLljAD/ccXKyJCdnRkEuHQvo+eya/EMHgiok/MqKHDqfVfZ+qoDwLjAb1voctzWpyy7ORTrvhXC6479lx9dmI/91iKlWcbC0zp/4ATIjAJUOCZL0YC0FuHsRU2S/AxrqZJPRsLbHYCtQDh70G4P6Afb3xRIL5pQnXoJcUOz16v9SFf6Q5hopr0q7u+xHz83Px1PGsbzBhMmauPHey+s733IojYa8m2oQT3cvTQ21ar2sAm3dU63WeYgRKBhTE8ezCBoAPB0Zaklr1veqQTOm7W4hoqvGsa2wKggcin0Esx5A7kiN6r5XYEegKu3x3/2Y8GEqvTZBdcsrUUDI50nBvSLVMjSB6OOKUjnbAqviwvlsWuXrE9WfB9JwnmG2e4kDoOwK2/ZM4K9iwvl2QwxnjAsmRNKv1i51ZquRIsm/KLxYujem3yDO/0mj8TTOtAEzojhZyJQoOsazewLyG2Rck8OcGq4MZzhhqqMkRgNPi0ia5ao5T92hat7VeTjXIzEjETwzP2Ah9VXnAOAFxxIJgh4grEFvKZyAdRWsneiszYBUSSQIctyWuvohNmXbXNyglHCbtaR1Y9aVU5TbU0OaSALyRXuDFRG00LjDM8DOf6IJgQMLw1BMxIvaVkTpe8HZuoz7Q/HFq3ftJiYWbRkMGNX9gxiu+nLDnbZHOKGh5wC3fvh1rSXFEUipsSyuQllDsVg+CVv4P9iXVy2L7AwLLil10Lli8a9r0x55bzlSHS1c6/D4jM9cZ6voErSrgA== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 225c8b8e-6c47-483a-a880-08df2a00e519 X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:04.3164 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SiesywIOKZlBwf0Nt+RjjmN5ZbL6TFzqVsXDbNrgvTcI4HJpuR0sqyWwY0l3gY5CpmHBWAjmDaRqX4nljON5RuxaZLJSMma/gj+G7+7kKXU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247769 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31911 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/a715bcdde830299cba4171514385cb17ec19b6e9 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/03-CVE-2026-31911.patch | 47 +++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/03-CVE-2026-31911.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/03-CVE-2026-31911.patch b/meta/recipes-connectivity/libpcap/libpcap/03-CVE-2026-31911.patch new file mode 100644 index 0000000000..fc35ada86a --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/03-CVE-2026-31911.patch @@ -0,0 +1,47 @@ +From a715bcdde830299cba4171514385cb17ec19b6e9 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +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 +--- +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; + diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index 323cca3d98..5b97c14e85 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -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" From patchwork Wed Oct 14 14:38:53 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100698 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C18E7CC6B2A for ; Wed, 14 Oct 2026 14:39:16 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15337.1791988748056411672 for ; Wed, 14 Oct 2026 07:39:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=rakFsRHY; spf=pass (domain: est.tech, ip: 52.101.70.53, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oeZQ2OPu0dAywj0SrKuQN3Trc5KroXIFAjW4F2M3dGxGioCzfoGqBWmQ6pk7srHuBo2domNe96YeE0uhdIIB3OVuvunyCoJQqEY6voPCGOeAL/0w+YwBLMNtru4oAwq7uy3U44aNFeCVe6OKogLgz+cZdo9x7Y69pO1znNkIaDMV9WLZv0knT95UFsOjh1O/qs4hS1XLhaCi4hICX7t5+mxmMmBi79Ry1NP4aKlz/xkRZBgaLqX6niUGTsOxS+jhGpHEdEfbjN+aIg/l1ZZ7gpt7r4KOsDPoGXa0Qz/XQ0BaB9eVo8gglpwUbxXjv+nCFUWLsyOOTQlqQfOfBDuzGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5a6wgmYxO1aBeckioTV1DZCwK+Re+GgRIdMCKWTouEI=; b=fvbWUjX14+PN0Yj5b27OufgVkser7NudWa3Cro0YN0TFP9WCczQD3cqCbsRtzMeBbzbKn0lncqBuMRon+hHI726+vH2Jw+s0qbPGrpJjaPOdqm0Nc3yi8lfoaMNLHvx8Uh6tiY2FTkQ37wPpQojwUscty7dku8GzkVvhI4vtbDtlbodXDndepBKDKUn8IzaTJmlbyWXWySl/bBe79p2xAu3OA6cr4Fxh4GFfNGwQik34HOhCNjxoqPGzubwroZyskYhwvvDltz/aU9BTg4/SpeuVjzHRjwYsAjNtJB2L+fLSN4s+qqTHYq8M0Pk8op+UiiF1dhuSZ8RYYgJACaHOCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5a6wgmYxO1aBeckioTV1DZCwK+Re+GgRIdMCKWTouEI=; b=rakFsRHY79sD9BGXU8F+XN73eAdBoi+k7yOOBCBqaPhSJY+XM+fffPpBIVok8QNRO/FSEPjSV61Fvr6LSb1qUurmB3cNVtEUTvfJP0MZv9d4+jMW7MQpZWS6M9fOsbhVJZTfuvJd88whsiW1qs5X9W2nSHwoo2EfULCv5BXRg1GNg8SI3WLbJLXfUZc41Q2msJLjA7Z4hTT/wOxlmAtFRwyZqIog9MndasG0iNDtGn7SBMuH8JfpQROeHnBXPgmgFUnGb9q/VcMmxERNzF5DXEQXj7BCANy789HU5mG1OOU0N5w8Tj9A+KwDYqhbV2HhpsIBMRMMD6mQ/jKaT1QfYQ== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:05 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:05 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 4/7] libpcap: Fix CVE-2026-6244 Date: Wed, 14 Oct 2026 16:38:53 +0200 Message-ID: <20261014143856.74426-5-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DU7P194CA0022.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::26) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: 5850b5f6-63cb-4c9d-aca0-08df2a00e5f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: kf7HZPaD5ueQ91QqR0LJhcyY9ywi7ugSRg6pYKUKgy7NYq9XNj6YRrTQdxLowEhebbbNObtFO3Sfo6C7l8Hux4L1s3SAY6KfT/rmizqCjyUcFXPJilQgpGXiFGBzXn6FRrRlC5fMR5fuHHVv2WsROb+JoURrbo4fXV59lvI9Yf7raCDM2JurX/OqQ6XS1aTZRFiEvMlxASKye9/+3wTCRu3P6oI6/StOS1Ji9jph/zys2eRph3w6p75fzmL1OFhZKIuZlN4Ck74OlDkcy8mIdP22I/eL/7CaIIk3JZcILgtfmqtvUCWzWj5xCddQ37J9+gHIxW49cTKETsTAW+Q3D6UhFkX0t7uUGtZonBOjArsmLMucC+MURD37Lt/040blkKaJTFhDg8lRLK+6ta3NEaA672/JuFXz5fzHbIqP4WLDo6J9B2JvTABCsQwMS7I7b+7QK2sLwmM351nNKLr9WFDKdgQCfrgem4ycOmm+foIqIuJqlrLGmvRQxjDBdOu0qv3MCSjtx8sXD8UTfhvBdQ/WsQTvQvTh4Pqac6KlPa7UuN+f5aJU3VZRcGM00/Ojh7ScIXkZXFuEXliwLnJT6C+pZ98TxK6VzyfTZhDIb2b5T3pkjBSFugprcRM8enRY X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Qx7M0LEqbKnecrDGsOFP04McmowHjK412Iqpl9tdmLx4xLqpmYAUGANvdZkqEaWF+nkgud5aP0PQTOH7wixuVUBCITxpjdPaPj7Hp7zh6g1185uhvS9MvOqizB/UGOZVmc+EsBQcTh1D1nw/6rA8jRV7K6MSTzZMz6lon7e7kxLIfhfn8PUAFMB14vH2AZbtLEayXR0JyU18HfeaTVf5SHDevG6pWC5SoU3gHe2sbjsvLW/oTRHq0l38JhaOoWVPY2uDkMML7iqFHown029jaz1Fm0zV9XVUcJ4cfdKUBC8fkTygJQR0MfaX5YhGDMZCNwBcvPv0skS6GyEt4vbyH1E1gpsmOuyfgmfO72IhO101tcVFVDmGJI9dReB4MQi9/35uIwzftX5AQaPI4Qqsxwvhii/CItjyUKRNXKweKCTNgdjnBBciFL5/obhPZACiWYtuhtdNNQbR9rDRK3BtYx6lZU6Napl7UBR4iVP5AfPWV6CTUnLlD4U1b18CT4THm5xPFvGUGjwPINcLzKrB8aeJpXCmDadqJFn5aAYt+qZRDXdizdflCCOyzWt9RWHmuZMTHoOGVOc7HjmDm5ruIgiDx7cTpFmhMCQ3aeBIl+dhyYuvh7xnIhdyeoNIvMob8Emr1jtpPBLmtu60mSZ/RYZO9fYQbz0sIoPbsIIgTo/5B2pVlcUPdEewBhBPsqEuvW3/VE8Idybqbe+Gb4guEqU0iO9OIkvuGCbuVvI+yQlQBKmmAL8zx8GoBId1x+UQ+NOfEPVqof5o9NqhUN3vrothLec9goGDCOUJrLoaay+xS+8a4b6VD5l9XBZnviIr6wmrC5t0O7AEA4wcSTX9qGMshUXb7p5bS0FM0ASczBWzL5j1e6M7KESeul6p4QSr9zdVivmAadiMMv3wR++AUpLjEzCV0AV5e9KzuSse3Mr0HSS3mQygWMjkTFXjzjtJuv/thDCi5MdpDEmNTpE75scXsbVfCSdy6fXRch3QZUsEQlB5bTW6H8VYV8tC+ZANvAoaNr79esJSu/shDZqemyaAhBN+ZkzlKpwsMnFNxlQUAtXonuTgW1JcaF3DNLbV+5ad73bTK8bcDUGwQZ2WW1N5Qs3F8LlBWm/+LSmMsCsCSiKjpi3dqdPX2qJEa9gTFuJRE5enLBfemCRdrgd+HFjS6F8oxRdF14FRY3XVQgKzciASMv/QsE+4m0gDQJ+ET7a5e9poGtEoANxPbQE1TZOVWDzEn2kowc/Z8hFR6GmemNooBhxy5oL5FIegcXww8tbmd2x5r131MJ2Os2aV/P022zbijyLO4Fd/Y9S5fW4WLTrURIqgvj6ZgHYxOjWqq3/FK9Z/7TnYxHspVCfHOY07U+yOAa+IWaXvJMeRxfaQZdoEsR04c9eM7fbO4Nym30Y6sB0v08aDD5BXpSubzsYNKP2r3AR7EZivMVVFgA9YKyItIOwl0xxk4qh9TMdSFFsevTIsLTgaeuYM6JLbTCUFzO7i0LTEknONrB/Gy9dc0CCwKTy9ybo5jN9yKX9xFczJcyRso2c/t6G920rcynE3Gp2Mjtt7KHyCPQAqJL9tK0ACVVmTspexHe7tGqMuxGkniB9yR+NQx6ezwLV6NR9kmdblRCArxdI4BhsjhSPGq1goH3KgSGnVEEtJaBhINKxWRrWnxNJNHm0mGtTwtCEiWX648VU+1ZYWYk/2cABDjgre6cX8MJrVFUKWh3G6Hmn9/j0n8Et1PwZCQQ2+Qg== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 5850b5f6-63cb-4c9d-aca0-08df2a00e5f3 X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:05.7382 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mfm1k1BqsFKGsASPT0UAABioA0yihCl4WUMNhxUk8U5+h/16x52zRiaYgz0MZ1aGRgNAZr6kOh35m9N+odd5ZBDizOR5jDjCcaGzgPJOQLg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247770 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-6244 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/98bb921b141aa642faedbf2ac510541c76499a19 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/04-CVE-2026-6244.patch | 49 +++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/04-CVE-2026-6244.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/04-CVE-2026-6244.patch b/meta/recipes-connectivity/libpcap/libpcap/04-CVE-2026-6244.patch new file mode 100644 index 0000000000..5215b12ffb --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/04-CVE-2026-6244.patch @@ -0,0 +1,49 @@ +From 98bb921b141aa642faedbf2ac510541c76499a19 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Thu, 30 Jul 2026 13:34:21 +0100 +Subject: [PATCH] CVE-2026-6244: Avoid division by zero via pcap_offline_filter(). + +The current revision of pcapint_filter_with_aux_data() for "div x" and +"mod x" correctly rejects the packet if X is zero, but for "div #k" and +"mod #k" it assumes that k is never zero. This holds for programs that +have been generated or validated by libpcap. + +However, this does not necessarily hold for programs that come from an +external source via pcap_offline_filter() or [deprecated] bpf_filter() +and have not been explicitly validated. If the interpreter executes +such a program, it can attempt a division by zero, which will typically +terminate the process via SIGFPE. + +To fix this problem, in pcapint_filter_with_aux_data() treat "div #k" +and "mod #k" the same way as "div x" and "mod x". + +(backported from commit 0b2b1ad4a1796513613ff68e9dc09049cc8e0af4) + +(cherry picked from commit 98bb921b141aa642faedbf2ac510541c76499a19) + +Notes on backporting to 1.10.4: + - The upstream CHANGES/changelog hunk is not backported. + +Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/98bb921b141aa642faedbf2ac510541c76499a19] +CVE: CVE-2026-6244 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/bpf_filter.c b/bpf_filter.c +index 497b1586..df92c433 100644 +--- a/bpf_filter.c ++++ b/bpf_filter.c +@@ -422,10 +422,14 @@ DIAG_ON_DEFAULT_ONLY_SWITCH + continue; + + case BPF_ALU|BPF_DIV|BPF_K: ++ if (pc->k == 0) ++ return 0; + A /= pc->k; + continue; + + case BPF_ALU|BPF_MOD|BPF_K: ++ if (pc->k == 0) ++ return 0; + A %= pc->k; + continue; + diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index 5b97c14e85..d23a018a95 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -20,6 +20,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://01-CVE-2026-0799.patch \ file://02-CVE-2026-31912.patch \ file://03-CVE-2026-31911.patch \ + file://04-CVE-2026-6244.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f" From patchwork Wed Oct 14 14:38:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100695 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11CCBCC6B1A for ; Wed, 14 Oct 2026 14:39:16 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15337.1791988748056411672 for ; Wed, 14 Oct 2026 07:39:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=pX53FAhB; spf=pass (domain: est.tech, ip: 52.101.70.53, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jad8ua57AI5YK46npZtPJ+KbuQoZl7D70vbbNLYGu31NFlILCzty2+QoOG8PSixk8LYDIVLZ4vr8j2JnhMj4c20ONsEYIywSR8bVccaMhJEY8xza6U16lu8YpUnPbDeyF1+wUNQG2AuVi1lbdmJHxD7U+NzrvL2pCqq7w4zcvh0lUAf7Oy421JH1MFn3S+ENVa4wSDS4mEg2CCDosyef7AP1rd7li40JlywbdN+OK6jEX5ClMnGwW8kKfBiMGdpbzlNoKOSHcwKSTjkQL6KctFQJBJFF8EWZ2vWGVS0C6oFtbxNDmhh9TMvzXedt09hPHRsrXBlZ3Xdx92jsAYp5LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oHNbe5LjwcsnxZGYzHa431uJiWb33kDZFR80EXu8kbs=; b=dOew/LWc4YGSday60T4plQ925pBoN3p1JJKlQ6MFZIg/7B3v8ejOdZP9ULYdRH0/U8Yp+ICxP4qNp2D+41y7Y3ghn6r/2WIFGt6TcPBOMPIuzH8ACJjxRFoQZzs4oW1bKreZG4maFQYohKsw+So4rh0bzw6YbS41tYEv1aHFHgdUM1a9ZiWXT7DUrhndvRwALlczwa55m5SsYSHXBqBtxYkT46xFU2gSRkZcJd+wLJReDaYtXf7Cv16Z30SOviVYb3ZV+Anelfb66xAJGJLM3EeqTA9afLRvyn6fMSNsIUf2miVHVYQHDqyuxnK6gwh2UqKHhbS4YW7vGbV0/iuQ0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oHNbe5LjwcsnxZGYzHa431uJiWb33kDZFR80EXu8kbs=; b=pX53FAhBIhV0B83eUF8N8gE4namWCV3FfUPfypFyGCIJDvOoWNuZwbuUa9gIopbslActcHTUNjLj81OPaE0meATR/o1Iz8HxUH5mlYjJvlfp86P/Y844v9dfvYKxs1bsqaFP15iZHZC0TyFAHB0xfeEMzHN1X/Q0FLUfL8/iLtjYMKWH0AsHVu5uzVOmnW672Ns9y1I511dv09vJ7Y5cuBwfvfZcC9nqugy+diRpIgxorGrkL75gLVvONEBftsZmyMYTuLfYPJhvdoCWngVSTcDhsmyaezm0iVvUfsC2PrBmbbd+sCg+knO6K8rtDPJb3Lex7L2PZP/r5v4wCD7vsg== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:07 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:07 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 5/7] libpcap: Fix CVE-2026-6554 Date: Wed, 14 Oct 2026 16:38:54 +0200 Message-ID: <20261014143856.74426-6-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DUZPR01CA0353.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b8::16) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: bef01695-9e03-46f6-5ce7-08df2a00e6d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|3023799007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: 5HMu3GpHq4Ghi5ph1j+0BBxT/15L44m1lljXvSKPxsmjvCg7kFEOycjYn9vo9LykPP/aFPYqgPF2LbWXeFiAjvyKEFmdQArA1hjzrMEAnK847GmRMgFAkdymwK8W8ca3SR77JsjC6h4lyPJocjNegwNiDxdwP5d335lILlyCVkiZ2jbkoX1J2AGW99eaCRRoNkrsmRaQPZNMH69tQa6vqyHfgaGNi82xvLcwLIp+h0yrhKGwAOjGKE3OPP0rQvGIBBAbgGi4dKeBLx+HgnXRXiRBOWGhsjURDpiu44dJH+F8W20amPHaPYfjnTqgJ8fA0OwpcplAa4BWQXo7UZsPyyBWnY5gfCXnB3OeMoBWxlzClke1KSFkAaBKDIezNzIV3IR+UNVU3JTuTcGiBqBHkFBx6zf2+DiIcRVZmY+cjmJxPK5sF6X6VNHc4jpQE69vstk3HwZo/VWdeBOaK2vzI/SZw1/quHpGhvpLoRGCAQmpHYNAoykgQJtwHdT02gJWh4yNa28mBUfIw8meGsTWPs65zTtK/p/2YIKnsMBJWDMhwlusrNO+EJXibHXUXhMMzBeBa8lskTAj5g6hkXxS4cfcTvKQkdAppzTliV50NO2GNcALn2V5xSmoQtozMqYp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(3023799007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NFRQEcF1eXkDScvaanlCY8/xdXokBWVn7QGgMVu/9k5J/o92X+MFnd5FWIvuApsvd1lOexiwhKE9R5IahX7TcSUDc2A1LLNgm2hCf3dJfUHagYyX6fIHkxtRCHgZ9HB8eKGn2HZaeotvPV/uwMqAqU61ghsjZ2BfqlESPqlgQZchngzVMslRE40CMc+yWijJFsGlt3zroK2iGQp/vDtk5ke8tQnvaNMhs/mi/BT1LxcDlFvzdA/V3Y6P9nmeJ7W9krafFq9qxLDZmfnMGpDziaXFXRUm4iXOWwIUI6Yii4qhYeHKS8YzQW6sso09Su+vgviiYLHQ0rtte6Ugpjp9KL2TQ5CYaz9lMrlQMiZKFu43M5d8o4TDbRftQuT8So860l+/xpRaRZRZmZKUCKOdlNjljM6ZhNlYbJuWOnC1mCxmVHjTpGh5JqeDY+7G3H7HM6hW0rUQqoh1p4DBHZh0kQZwpiRf8ndfG0NmTW0B1VIXAevCGoTv+CzoJ78nA7v09ymN6zrL4CbYqAYN5mmfjDZuibBTZuFeauhNyUot5i/J8rBNiojt0D+MxbFZD60rXxnw1PqM8zkZ5YsxG8sGqKzKfXaQXHWtefmO5UOR+txjwrCFiI3TbXk5grAayr0Gs1i97UD2lUkryXo9JiI52O2zGBVoi0/LNbcHk/mCDHJ5K9Ij/RhBShxbla+Hv7VPAy226gfyxEnJWjLU9UMN5ki0O9p474qzRxYri1Ni1fLSIrrXQ4uevslKvZ+2VlBuUSMUOzCcE3dkwhuCTUFFUkNE+WppUCO8iCH0YLrCQn1r4bDjuiHBTByzFE0iN8uHSEFNfyBM61WGP9KGwPkvcHu42WH1MdzR/Lke+C47TEkd3k2EhFNwEjWh0MvX2YS12e67UfvRaI5AJfMnb2N0J5j0qfTJVQL6qboT702dqMRf4TNHHjd+wXMl2IbKspjY7OdEyseVXJKubYkNDmiwgAVHsruIudpPRfFn7WlXeakdtloftXUvpVwTMfFdDYynX9992Sc/jCRQmWBgfx4LAL1cqSjVVgol5nl1BgQ6G+q0NdsqGWPRjdgGoN3qZSeecAKQBmFRgQ6loXZRAHEwGvxrrARCV5JoC2ESE0bvY6JQlD9R1QBz6asme4zqwSb2QRMz3wuoUwsabwKojsAn8kG43ABy3IVX8hKjR9gGCWOSBnnupkcUMVbT1rP9TJn+siYnGS28Tu7RJQXPUy6FVktbLgo6lIC2I0hku+epTLoElvZ5oV5lAjUuYNx5LkeIiaZSzgKPn3bqZNwHc67vAEe9gtoEVN4qYD4JFiqIrlx/KFwX1MNyXILZE0caE0TR5UCMv7bN6M78A6mZ3hv38CxcHDth4ktFWXgEKWXeJEjJxzE1YF5Jx7KSsPiZFTPK2Ox6dzBjTfL6w3CvLzKW8vagDt3DxB+q8QtFRiIVg8xqXghIq5QXVg09JHI2AHwLUIfgkMedY+TvEMdJ78NB67ZwuppsV1DkLL9k7xLP6OxPeqOnKhccOfQdm1APCo4yatglLhXKMW+0neaYslh+Nk4d8NUcvc5OMazSizM0bl29DMr1FKCW6rjwSb/JHPXjoMhgnnI6L4ACMJmwvHHZQ1uxj6oRe6/PDXVmcCrRTyP0reKiFWS3PEOCW/enPaa9yY0/3B8Ak2u/XlB1/h+sopYCSVv+GbQ4lZ74m47d38WWctjc5wBluc0XelBM1c74NAUViKruTG7UfFkJ/xn6Qw== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: bef01695-9e03-46f6-5ce7-08df2a00e6d1 X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:07.1845 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WqPTZ9mBycQ9uE3tH3oLorhQcgCl/i6b9hxSiB9gyio/yIqsLiumOZOJmeMjc+soNNzFbl+xxILkISHMr3vgY1vhNVfR3Ssg98sBVp0kLDw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247771 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-6554 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/ff3c83475ac303c6b681c52ad0b6e14795a8e0ce Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/05-CVE-2026-6554.patch | 92 +++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 93 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/05-CVE-2026-6554.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/05-CVE-2026-6554.patch b/meta/recipes-connectivity/libpcap/libpcap/05-CVE-2026-6554.patch new file mode 100644 index 0000000000..9c44294d1f --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/05-CVE-2026-6554.patch @@ -0,0 +1,92 @@ +From ff3c83475ac303c6b681c52ad0b6e14795a8e0ce Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Thu, 30 Jul 2026 13:34:33 +0100 +Subject: [PATCH] CVE-2026-6554: Limit "ja L" looping in pcap_offline_filter(). + +This vulnerability has been discovered by Kaixuan LI. + +The current revision of pcapint_filter_with_aux_data() assumes that any +"ja L" instruction in a filter program does not jump to itself or to a +prior instruction that is guaranteed to reach the same "ja L" again. +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(). +If the interpreter executes such a program, upon reaching such an +instruction it will begin looping infinitely. + +To mitigate this problem, in pcapint_filter_with_aux_data() enforce a +hard-coded limit on the number of backward jumps per packet. Ibid., and +in pcapint_validate_filter() as well, reject the only immediately +detectable case of an infinite loop. + +(backported from commit 63c005c25aeabf1404968add49fc885da3e127e0) + +(cherry picked from commit ff3c83475ac303c6b681c52ad0b6e14795a8e0ce) + +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/ff3c83475ac303c6b681c52ad0b6e14795a8e0ce] +CVE: CVE-2026-6554 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/bpf_filter.c b/bpf_filter.c +index df92c433..ae8a3a36 100644 +--- a/bpf_filter.c ++++ b/bpf_filter.c +@@ -72,6 +72,8 @@ enum { + BPF_S_ANC_VLAN_TAG_PRESENT, + }; + ++#define MAX_BACKWARD_JUMPS 64U ++ + /* + * Kernel BPF implementations tend to define BPF_MAXINSNS to 512 or 4096, the + * userland interpreter in libpcap is meant to support much longer filter +@@ -146,6 +148,7 @@ pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_int proglen, + A = 0; + X = 0; + const struct bpf_insn *pc0 = pc; ++ unsigned backward_jumps = 0; + --pc; + for (;;) { + ++pc; +@@ -320,6 +323,17 @@ DIAG_ON_DEFAULT_ONLY_SWITCH + */ + if ((bpf_u_int32)(pc - pc0) + 1 + pc->k >= proglen) + return 0; ++ /* ++ * Terminate the program if this is a non-forward jump ++ * and is: ++ * - a guaranteed infinite loop because it jumps to ++ * itself (exactly the same as in the validator), or ++ * - a backward jump after many enough backward jumps ++ * already made for this packet. ++ */ ++ if ((bpf_int32)pc->k < 0 && ((bpf_int32)pc->k == -1 || ++ backward_jumps++ >= MAX_BACKWARD_JUMPS)) ++ return 0; + /* + * XXX - we currently implement "ip6 protochain" + * with backward jumps, so sign-extend pc->k. +@@ -607,6 +621,17 @@ pcap_validate_filter(const struct bpf_insn *f, int len) + */ + if (from + p->k >= (u_int)len) + return 0; ++ /* ++ * The only type of infinite loop that can be ++ * detected in this function is a "ja L" that ++ * jumps to itself. For this only k == -1 ++ * needs to be tested because the check above ++ * has already rejected all other values that ++ * would wrap the pointer equivalently on ++ * 32-bit architectures. ++ */ ++ if ((bpf_int32)p->k == -1) ++ return 0; + break; + case BPF_JEQ: + case BPF_JGT: diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index d23a018a95..f7ba1bf3ea 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -21,6 +21,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://02-CVE-2026-31912.patch \ file://03-CVE-2026-31911.patch \ file://04-CVE-2026-6244.patch \ + file://05-CVE-2026-6554.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f" From patchwork Wed Oct 14 14:38:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100696 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6F64CC6B1D for ; Wed, 14 Oct 2026 14:39:16 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.15337.1791988748056411672 for ; Wed, 14 Oct 2026 07:39:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=GZ1H5x+Q; spf=pass (domain: est.tech, ip: 52.101.70.53, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Z9uIVhwAjV+aiENxjPxZ/FvLjsbVJqy77+rVqpgH6f8NWxN5ceUus9E0TkxMt7g197RRXIYuPQ03eegUf7Nzt7Rih9JGkNeNvkYlPgUr6Scep6B0bFx9i8hDjmUF9/uiop4Ksq7hjZGkVttUn4c1MlRRfAJSdabF7Mtu4ytTXcv2yy9VqGCsE8TuGCjM0FbZzeUMgLsgMpKJlkoz6q3o8SLl/4o2d/TriOzK9dVHDtVsB/9S63ppRQBujumwwPCEJfP+GDvLK6SDROlBNUTfY8WmGgflBar1hP5baIoiOj+7GpjwO+F9jOhcp54EVvsj7ST+izJOCovbasNYrl8OKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NHqgsC8NqXAMTHSzhSS+nUQV6h7LsGmhJwwBtM/fs+c=; b=LzTK6PEQYQCrie8OyOJbSyR7Xabbp3FLkG9VPA5PZ8U/V0sERtY721pj4j68eIUFSK0pjCMBaMvNG++Y8UmgcHgUQRxr4T4NsPkoBdN1isfMIV1sDdy51DYP7gsQohiy0Lm60+gpS9qXcbGHfMzsgzUy+7VJ3+9XthHdxk4YWHQ4AT654aI5UsYyObGdoDb++fs2QrrMwXU6QJnsyEUh0YLQ6zMfctJrSYf21GUgS4k3U9pdGpqHaOFlsftDdu4mp6yaELmuvw65NDjMjPuZlRaM4q2xMFkS9y865ffFZVuEw2qOChAYI5zYYae8PiXVui1wPTmloqs6gKakoixMzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NHqgsC8NqXAMTHSzhSS+nUQV6h7LsGmhJwwBtM/fs+c=; b=GZ1H5x+QcgoeVjgkGdm05NgfkB5jQIl6cpKImpBtC5rmwJhF2kNkvkl0R1PBEhWPZK4BSk/19h2oXgCjDekbnPjI7DnUt+C2pzRY7JlzMA/W033ytR+FvckLxgW8vdSJSz41GvdhAysumVyxgSzoRaB3AqW7z1vaDAwKHiV60juJ9zYEWfwlqK3XGKIUHVBq4YWkB/erNghsq9Xm5527YIGDPGs1S+6Iss2UsqVmKle2VvpVrQAo7CRgvxMYAKpKUB1tCZWu8lwYH4TCJUZBQ1l74xiXYHsU+zZqxltuDuW+gNIyxq7rsXzL5Ug7i40+pjgsPnLc8hoF6ljTZw+6tg== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by BESP189MB036075.EURP189.PROD.OUTLOOK.COM (2603:10a6:b10:138::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:08 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:08 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 6/7] libpcap: Fix CVE-2026-18313 Date: Wed, 14 Oct 2026 16:38:55 +0200 Message-ID: <20261014143856.74426-7-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DU7PR01CA0036.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::25) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|BESP189MB036075:EE_ X-MS-Office365-Filtering-Correlation-Id: d3f99132-336a-4940-90f9-08df2a00e7b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|12006099003|18002099003|22082099003|10067099003|13003099007|3023799007|11063799006|260925022911599003|260925021311599003|260925021911599003|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: RHP4quT+sI/2GL37IDdvrp8CmgvVpXKIWtbbbv45GpbOS8aj7Wohn1h6wgovEVfGB/W/tMPDugzas0o+Bybitf/0Ww3RJ3RoQObKchOZTqituj15KhyCVjaaTrujecg+MDRzHKn4sBUM6hlzLWt08+45r80ysjzQzgsBZiEbWxj1XoIYJeZFY/S0nZUsq6C8q7gSkz5mb1CeD5tnSNY20ZG/95Fw8o6BKHf8GPpyAFBcrqyiNqt67f68qBId9lQKAgJ/8dKxogg/g/t72qIGv3nCxGyG+5uJsf+/eUvr87Sy5gINDM1pkwF44cYfsntw4NHJYwcPpNmvYKX/9gOAAG5ryJ7kLCV/nfu6C9iYhR16xU+H/9xnNR2bb31F9MJCiiiCmhUVpSaCUmYVXWxkfAHjtSu5auhFshRj0QQ/wp47GNRWIDJNRixUWKuj7CFxI8TmbDc/wue7iZIyp0Py6laWqnsZP2vCwDRfTA2QH8CCFc7Vo3WRV9XU0znATfa1tgxgjf5WdgrbBU8eTlSs+qMDM3aWWO7viasHiNoY4tLlhNw8vH6GKe3MJ0p2dojPLpo7wN+kBsHIByZNwEYPcaLGlmMdvCKDXyHGKVHwKb4hqd0HHYsWdR7ersaRU7wP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(12006099003)(18002099003)(22082099003)(10067099003)(13003099007)(3023799007)(11063799006)(260925022911599003)(260925021311599003)(260925021911599003)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xL/8UEP3ML1jU0RWmbC2d7QRNu7cu39UCmBzeKZpxgBJKTvU41F3XaoNX4G/SVtHUcmFPSojK7ci2IgrVFc+oAf4tDss3zEnzGThxnwAozr23adxx3HX16+/ySwSfezMnjxSVcriLRngONpVxjt7anAapxy4VcIZh5FcoX3MIoaeqNO7PFys3BHom8XE0+Nn5K0/X+607SUo0pGblC0QGGlL+slsMEf1HsiMGsQbsCNH02UEAUGOgLgB9o3Y+AyC31G6X0HJpsS0qEa5InRkq65cyoInt0XDazYnYM1UvDNp4Y8eidDOWYE5UMj7dTU4rPbhcoLCiBt+QuYOj+Pq1a5/d8qkxLNb1vxgtla3IMwl6YE10Y9Qt+K4tnvV3P3vzhdbXWr+itwTFKUMrckJtODd1A38GwfplyPEfcULGCgXZ3nBRFN9Cnd3r31Dy3fksWpZqwZfnHvc/isxJN99KS2o66g5XYnkKiSwg37pNl3+//sP0dAvbH+wPHjob9920GrYNNZT3pstE4HpaURMFCMOZDEq0bhshMB0bNAUFNtQDpeg2V11mtTe8oLwQUl8/JzTbXl4UpPawBgV44vFyIF69sVeFyWueaW3D0YACFHbJzJOzdG+UZc1aBGVAYcA4u9/1Or6VzYcBbPl2kXRMYtxk7f5O128MHuh8LEQK+toL8mH9nzEcvapQ7xTK+liHzLIoojP4Ppkb6tm7DVSED5aSeVdoAP6h1CxsVegQzD/x1R0VygBBybwxtBxWJ724aGhKxzDRMgfol+NBQ1uzH7bm5vdLcZCzHH8gp3AaIv21SGa37PTMmRSPwOy3bDy50P9j93b9QqNGrOUmbKfDtCpwj/XDw5DX4FDtklo5gqlkGw2TLrADTCA9G4ntIi2bZytfvtNdQvacgc0nz3riUmYbxx1njYG3gzHYhNS7/Z8MPufxGpdXfPezPRQcq8AoR9RmIewhNPtkyfFWyCqjFwrvFQUy/ShtEqECmbe/bT4PCzEvAihovawhSiz0IAfO9KNf1D2A+DiG1av9eZSaxxxAiZhT5zbhprX8uDA8j+DPVf0vt/2WgScfRKL+9aQ4qstx/kQ797GgYpTzQY+SgJIHxLKVttVpwUCTz+zf0VhGmsRn3Gk/FLWr1J2vhaVD0mveaIu+07TH8iUG/GtSJlYRQaxndsJIfX/hoN/gaVFheap1dWSCnLd6iLYjx+yLhOATq0dWCUTvaS1oP0+ON6bliQ/MDheRM3OxMbzHHGAi1okQ0r4yzDUOXfPNoYwgdg8OEVmqyZlry29ziV/r0SW2t2bEkAOz0NFcGWBbkZ76nPxaaHA6JTDAamaQLFALCvN5c8nHRmo61WCeZYM2T57q8BBYK8CrAh3CHxrcXhPr0yg8SQyOjXlHB2UHReziWUL2PXnoSAWwP80BIajqycEMk5hswxo4+OYoj5vNAzsIyuXfUGrTUKyNZnK6EvCYLsixTG73+A6ko4zXPDH/anOuuH+8eaJfXNrYeIasrKqaUuOCb0XTI+Iz11dUQqVTagthuekrTMOui6dWoOHw2216C+JcD9dkrq5dbj6KhRCHfZT98b+utIrcdPnRiPQyj89XKi0KsIgTwruuCJdlo5KU3VG/ukqnLCmpdMeBcjn4gY2eKLlx398BfOt5Ksi18Z+FVYrVgHJz8oUKbp38roX4tMvmYYqZRJuJlS5XppNqf0QsVvVBRUYtlyzLhqs6sxhbBx0A05/wykfyNpr5Q== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: d3f99132-336a-4940-90f9-08df2a00e7b2 X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:08.7176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JDylgyBrxId6vRwcI0KOeilNHmbl9Nq+giy+vz+2Gf1o2phtFkD4hPQCJ+8auZXL5/jh3ivN6Hk/4EZIODN5uUUO1wqEu6VYS/+srntsTe0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BESP189MB036075 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247772 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-18313 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/f9775af1a0ec76db60c7213241e6b48f1be10ac7 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/06-CVE-2026-18313.patch | 84 +++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 85 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/06-CVE-2026-18313.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/06-CVE-2026-18313.patch b/meta/recipes-connectivity/libpcap/libpcap/06-CVE-2026-18313.patch new file mode 100644 index 0000000000..2a9df12e2a --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/06-CVE-2026-18313.patch @@ -0,0 +1,84 @@ +From f9775af1a0ec76db60c7213241e6b48f1be10ac7 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Sat, 1 Aug 2026 18:24:48 +0100 +Subject: [PATCH] CVE-2026-18313: Fix a memory leak in rpcapd. + +This vulnerability was originally reported publicly, hence no credit is +given. + +daemon_unpackapplyfilter() can allocate a temporary buffer for up to +RPCAP_BPF_MAXINSNS (8192) BPF instructions (65536 bytes) per each +received RPCAP_MSG_UPDATEFILTER_REQ or RPCAP_MSG_STARTCAP_REQ message. +It never frees the memory, so repeated messages from a client will +eventually leak enough memory on the server to cause problems. This +holds for all connections that pass the validation and some connections +that do not. + +48 bytes in 1 blocks are definitely lost in loss record 2 of 2 + at 0x4844818: malloc (vg_replace_malloc.c:446) + by 0x111AAB: daemon_unpackapplyfilter (daemon.c:2372) + by 0x113279: daemon_msg_startcap_req.constprop.0 (daemon.c:2139) + by 0x114808: daemon_serviceloop (daemon.c:901) + by 0x115BC7: accept_connection (rpcapd.c:1321) + by 0x115BC7: accept_connections (rpcapd.c:1118) + by 0x115BC7: main_startup (rpcapd.c:709) + by 0x1112BD: main (rpcapd.c:567) + +To fix this, after a successful malloc() return exactly once, after the +free() call. + +(backported from commit 26a1c75702b105ac8788014f35f1b5c57fa6043b) + +(cherry picked from commit f9775af1a0ec76db60c7213241e6b48f1be10ac7) + +Notes on backporting to 1.10.4: + - The upstream CHANGES/changelog hunk is not backported. + +Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/f9775af1a0ec76db60c7213241e6b48f1be10ac7] +CVE: CVE-2026-18313 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c +index 9b0f8285..b0268688 100644 +--- a/rpcapd/daemon.c ++++ b/rpcapd/daemon.c +@@ -2378,14 +2378,8 @@ daemon_unpackapplyfilter(SOCKET sockctrl, SSL *ctrl_ssl, struct session *session + { + status = rpcapd_recv(sockctrl, ctrl_ssl, (char *) &insn, + sizeof(struct rpcap_filterbpf_insn), plenp, errmsgbuf); +- if (status == -1) +- { +- return -1; +- } +- if (status == -2) +- { +- return -2; +- } ++ if (status == -1 || status == -2) ++ goto free_and_return_status; + + bf_insn->code = ntohs(insn.code); + bf_insn->jf = insn.jf; +@@ -2401,16 +2395,19 @@ daemon_unpackapplyfilter(SOCKET sockctrl, SSL *ctrl_ssl, struct session *session + if (bpf_validate(bf_prog.bf_insns, bf_prog.bf_len) == 0) + { + snprintf(errmsgbuf, PCAP_ERRBUF_SIZE, "The filter contains bogus instructions"); +- return -2; ++ status = -2; ++ goto free_and_return_status; + } + + if (pcap_setfilter(session->fp, &bf_prog)) + { + snprintf(errmsgbuf, PCAP_ERRBUF_SIZE, "RPCAP error: %s", pcap_geterr(session->fp)); +- return -2; ++ status = -2; + } + +- return 0; ++free_and_return_status: ++ free(bf_prog.bf_insns); ++ return status; + } + + static int diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index f7ba1bf3ea..5f1506f8fc 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -22,6 +22,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://03-CVE-2026-31911.patch \ file://04-CVE-2026-6244.patch \ file://05-CVE-2026-6554.patch \ + file://06-CVE-2026-18313.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f" From patchwork Wed Oct 14 14:38:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaipaul Cheernam X-Patchwork-Id: 100699 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9509CC6B2C for ; Wed, 14 Oct 2026 14:39:16 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.20]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15448.1791988755421376542 for ; Wed, 14 Oct 2026 07:39:15 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=C74ndloO; spf=pass (domain: est.tech, ip: 40.107.162.20, mailfrom: jaipaul.cheernam@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D8EK3hLZ1bIQ6FuhbaMz1dfTJc8YdaWJU/+9jdRHe4CdPiqdaW7UQvrTXDZBYpyolknz9SzT0EaBpDtFvj+TK05YqnOIGn5e3oJJqPWNWbdG/kcm1aP2j9GJm7IDPitmATMIbYJcu+T/nVjCIAoWLfKF8LZLFH3S+OVpE0Vx3tneLqJX/g6h5ukqrMx1+xNcVG26UuuC85CbUD95grSpja5kcjgBuhzlNTq8WKRVywZmOMVP60LkC1EkjfezTd0oZ+Q7e1OkwUhI/KBWoOJA9LnPICXJ1wlwdZ2VaOD+MrHRm65lnmbbU2nWY/VrAjqu+AlW8tpung97rZnHWJEpgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=91gYnffLarq0ccFgu/lurfVxECPeIC58YO1UpBPYTPc=; b=jcLqGi3QJi4f/LWNJDGu5LMqK8FKs5qUwHTg0w/YUhJS8dWX+mFTnP2ZWjt/boSlSWs/T/7O7UjxqorCGb9hj2kPzw38OxlHSzf3N0rlBYSk/MByF5uoeewqaG/HCdz/AC7jkcQOEUlEyTeiqMzHfzmkqa+kQ47X5+kJynIqZ4Hk/OlfUSsXJb8lbnjGnzlJ7HCLDJS1E2b6RJBcXGZp4nwJqIvmuflaFgf8OlBmDB53/S6lMnQOU2HZcWLKboijkcxAqDlcQ0hoOENCuJQKzeXWGIJ5oO2za0UCOkmp8f3pG9YDZSlJhq0cQrJpkEOTH9+RRjv7Swp+h8zoie25WQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=91gYnffLarq0ccFgu/lurfVxECPeIC58YO1UpBPYTPc=; b=C74ndloOZuvM4w8U/0fDmN0PnOgomT4CwUjGGEr0f+DpzrCZxRfsWs8betefRfiT5eOp/BLfCnhZBtGByaCgEds0NrmpOKrQnDisAGxHxyfKs4Anf8Mxb54fMru4qx5sfirS9f6mccBSXYlRwv+nWY28IioWnLNczZRRmqg/Sjg0vlf+eHcGnEsPjWKnmEzQ8LypteK1JbXuvqamVJwd/ztkV6T7aQ/pSYIfYUZAHtQczor7vyVGu0z+Axh7wLuSYLxVTLEsGdjGH/KhZOXoTGnOZQkbhekA6mGWgdz7eZZG6zcf2OeMBR0fgj35mQqehtdW+SVejDCTGUqgYdfUoA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) by PAWP189MB2570.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:35f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.522.13; Wed, 14 Oct 2026 14:39:10 +0000 Received: from AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb]) by AM6P189MB3107.EURP189.PROD.OUTLOOK.COM ([fe80::bc97:3847:8f02:acb%6]) with mapi id 15.21.0522.012; Wed, 14 Oct 2026 14:39:10 +0000 From: Jaipaul Cheernam To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v3 7/7] libpcap: Fix CVE-2026-18238 Date: Wed, 14 Oct 2026 16:38:56 +0200 Message-ID: <20261014143856.74426-8-jaipaul.cheernam@est.tech> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261014143856.74426-1-jaipaul.cheernam@est.tech> References: <20261014143856.74426-1-jaipaul.cheernam@est.tech> X-ClientProxiedBy: DU7PR01CA0026.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::22) To AM6P189MB3107.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:6c0::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6P189MB3107:EE_|PAWP189MB2570:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c80164d-7c7c-4e97-4a54-08df2a00e89a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|366016|376014|6133799003|10067099003|22082099003|18002099003|260925022911599003|260925021311599003|260925021911599003|12006099003|13003099007|3023799007|5023799004|11063799006|261009223027099003|56012099006; X-Microsoft-Antispam-Message-Info: zxak4u3013Tw1/5hGSSyWi63k0j+G8n/g4CYDnRPB/GXgkBJsKEp2cOh1yc6ijmqelT40maaSVZ0GakpaZu9/RzHwYtVa4RrntsGon9pZntT0QdiFsmHbw6OV1REN+vf3g0r++JeAZk2qnqR9q+PReBGHRIKQcLHLEtterTnkwLVya5ZpwgW+jGfb3Yqg8kx1V+aQ0WLg5k/Y1AiIamUX/AR3uNSQJDzHkpf7SSs4e4uPOMTuV5/i+RKZtq020VbnCFkZvu3wZc+X7l9LEGENgcAhl+xe1wJ5uBTK1r1YElsxMk6RDwJTo36LOIFuWWUjevgCv4WkEXGeIRUoKrY4fTV0Ke4lFrp4eFYarHrHrCYFYTfDOnbYalPFXKqrr1Fg4hsmyyIvtjSlrnoLmLgpLD1OBSP/gPONZZr0XWqvWc6qas7O+25V12uERN1gXvqnZusSRc5y+Iw7IF9CZHJhukkCYU1DJh0qLOLtTFyq0I3dg/MoqojVaDn5mtQkpQHEdA5ahmo1pLJ1KXW3zgZwyP9RrVK86A3qgj2xb7w4LHJZbxoWwA75Z5a46zrs2zrxcndiJnhEhmMadgHJCg5Ia0FYjddaZZrXgjt/y6On251GEwWJsWX6W+K6hWptyzr X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6P189MB3107.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(366016)(376014)(6133799003)(10067099003)(22082099003)(18002099003)(260925022911599003)(260925021311599003)(260925021911599003)(12006099003)(13003099007)(3023799007)(5023799004)(11063799006)(261009223027099003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5evLe56N0O32rc7/8VC7HWPkUO6km53Jnmteqr+Gv4BuosAd6yGw+vCz+DHHu6Tck/hv6w8aAhDwngkUXwzBZgSwdtHYLo83Cz83wFHiAO+/chFuuRw8m2ffZPebVSv17WwputLcQ12euD5a4kOUc9DSiwTqyvdxOKJDU2ZHiEETp9nTVwXwwYZ5EJbitHzYLEqo0gtSBEdaSPRU0J+t7ZwOiJX1D5wHUZ6IscOeGHx7JtB+QHSRg3A2XuId8uZHnZfrXtqcWuDsHqC19kdSXVUTBaITmnIcOizPNY9C242G5/0NdZlqkbxhadosnsvSj+QlOC9ZaDSTd/inyTqBFFOWm3pkXwU4Y6RX1BJ/rWiOtlR0UD6M0XNRYaMH9Gv12uVnhc6xr++POC4hN/vdc+G0/D2OZvyfRenM+Iqi18hIo9ZISdVMUMAGPp2QT3DrOPUR58W5lZQDoFvnAnB/3S2I5vRzQ6+QqluXeNQNNwjuTuj6ntcc4XWap+jAeUNPcs1tQAsfyvrrJGVjI8zhKVtTEvxqlYnsE+nJ8k4ezCOKVO2jRBmV00ba7jys98DzqLSQqd4iG5He4FQ8MuKmu+8ubdDzoM9mea0ZTcdTI2NcfwQ0BT/Ni2E2o6DBmujiIe9CLgDcydSNiz+xS1Wetcb4ayEe3IQB9InEnJzQ7hXE8GLRbqLXJAejY5vaGzPXmkI/9pAAtOCIZnvkbMNweUFOCVJMRNfTax738haJEa3VWLdrueIqjsiMqiR3Mz4MQfXz4VWtAj3/JuD5ZD8C7+JbWeiB1CftC+3lCEuKVUhvCnhVshosa5Ju1SrnikwOsc2nHcXaPJyMf2tZAlxXftvQxPMivAij2vV7cilAD0cwpAETUoqUYDYB6Pwn6Y0IOou4jgg2E4SOfQliMoX36Xfck4Gm49yfdlUFBoIo7UVeDp9W1TCV+lnS+5V51AUoljRSmD5awf9JvdF11Hx71fYNN5KE2WofgMVIrHngG8zEoL194sa+yJGRfDvffI03NpzjgCHMW3xvpKwqKtYh9nApfQiQXmckKwlVYyQV+YqrgpDibv/qnO3aDan1BdHh5Gv3x2XZMCv6pnFcb/FZAs0yoO21MEeTsrB/84pOXTN53qtwtgTGSjrvxjUTEcnXh3N55v6Y6GBJiFB9vsddKsIxrwwzKcPz80jW1MLJOzrl/k6lHgBg48fE8nWRsLNkB3Kjhj4o2OwysYHhEoywdhVS/mEMaYU3L5IaAOhIloO5T2A7MLUxkATDcX6rmYli1lIKlaTs2LN7ahV2Y5ks6UDdYfrt1cQ8ZOPl/FAAyy0Lv5SolzurROIfmVUnrrjHN9U3CFwrVS4tGxxcVOOALuumMvh4KU+wLienquHOgDO18AeSGNePHG0DWrBBR3cLWYJHOXC5Bnnjp0HZHBKdQyGBs4jNrze90vRj/XztQKQ+iiczl44R26cInC6bg8PSlZOxv+fkzIfTAgFIQrOVy4sXPInuwxRh7DDJB+rz9nXk2vj9dCli41piEPAH+8o6yPNTQFBPRg4GdqkrP5GeRAQVgWdmjei37tUbEWrtOJfiK9J1yY6G24MJISVCAGSanvQEsMHXCw/XqteOlmX2Y90baNM9KjR07d1cQIHh5/nRI2w72j0YJjlnlYmZIjAEJkTlWcMIDGH1bQo9LGORtFdhqrsXibQ1eUSB9nA6aC47i6II6ENybKNOISOiXglx7sWJFeq06gXu6fyUc9cLYQ== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: 9c80164d-7c7c-4e97-4a54-08df2a00e89a X-MS-Exchange-CrossTenant-AuthSource: AM6P189MB3107.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2026 14:39:10.1863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SJNxqkc6YVqX5uEVNVT+VsRc2Xr+QFt5whRj2oXbFLprsWxcGdqyDwbePDqIy20wYU7akblHp+Iga0p502lMkFhT+5K7/7w68eVmfOOZkgU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWP189MB2570 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 14:39:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247773 NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-18238 Upstream-commit: https://github.com/the-tcpdump-group/libpcap/commit/b9590d482986d64673712460aae1d48d11fa0473 Signed-off-by: Jaipaul Cheernam --- .../libpcap/libpcap/07-CVE-2026-18238.patch | 222 ++++++++++++++++++ .../libpcap/libpcap_1.10.4.bb | 1 + 2 files changed, 223 insertions(+) create mode 100644 meta/recipes-connectivity/libpcap/libpcap/07-CVE-2026-18238.patch diff --git a/meta/recipes-connectivity/libpcap/libpcap/07-CVE-2026-18238.patch b/meta/recipes-connectivity/libpcap/libpcap/07-CVE-2026-18238.patch new file mode 100644 index 0000000000..36f80c483f --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/07-CVE-2026-18238.patch @@ -0,0 +1,222 @@ +From b9590d482986d64673712460aae1d48d11fa0473 Mon Sep 17 00:00:00 2001 +From: Denis Ovsienko +Date: Sat, 8 Aug 2026 00:31:10 +0100 +Subject: [PATCH] CVE-2026-18238: Fix RPCAP_MSG_PACKET validation. + +This vulnerability was originally reported publicly, hence no credit is +given. + +When pcap_read_nocb_remote() validates a received message, it does not +verify that there is a complete RPCAP_MSG_PACKET header in the rpcap +general payload, also it uses an incorrect value to validate the length +declared in the RPCAP_MSG_PACKET header. The latter can lead the +protocol client to over-read the message buffer by 20 bytes, which in at +least one scenario can cause a SIGSEGV. + +Fix this problem, as well as a potential integer overflow in the UDP +code path on 32-bit architectures. To make message encoding and +validation easier to follow, re-jig a few variables and update comments. + +(backported from commit 2d67e814e8d3791a8b508c359f94688c5669cce9) + +(cherry picked from commit b9590d482986d64673712460aae1d48d11fa0473) + +Notes on backporting to 1.10.4: + - The upstream CHANGES/changelog hunk is not backported. + +Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/b9590d482986d64673712460aae1d48d11fa0473] +CVE: CVE-2026-18238 +Signed-off-by: Jaipaul Cheernam +--- +diff --git a/pcap-rpcap.c b/pcap-rpcap.c +index 22fc7363..30fbd6d6 100644 +--- a/pcap-rpcap.c ++++ b/pcap-rpcap.c +@@ -388,10 +388,9 @@ rpcap_deseraddr(struct rpcap_sockaddr *sockaddrin, struct sockaddr_storage **soc + static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_char **pkt_data) + { + struct pcap_rpcap *pr = p->priv; /* structure used when doing a remote live capture */ +- struct rpcap_header *header; /* general header according to the RPCAP format */ +- struct rpcap_pkthdr *net_pkt_header; /* header of the packet, from the message */ ++ struct rpcap_header *gen_header; /* rpcap general header */ ++ struct rpcap_pkthdr *net_pkt_header; /* RPCAP_MSG_PACKET header */ + u_char *net_pkt_data; /* packet data from the message */ +- uint32 plen; + int retval = 0; /* generic return value */ + int msglen; + +@@ -448,13 +447,35 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + return 0; + + /* +- * We have to define 'header' as a pointer to a larger buffer, +- * because in case of UDP we have to read all the message within a single call ++ * pcap_startcapture_remote() has pointed p->buffer to a buffer large ++ * enough to contain all of the following data at once: ++ * ++ * - a fixed-size rpcap general header ++ * - a fixed-size RPCAP_MSG_PACKET header ++ * - p->snapshot worth of bytes of a captured packet ++ * ++ * This is sufficient for all code paths below. + */ +- header = (struct rpcap_header *) p->buffer; ++ gen_header = (struct rpcap_header *)p->buffer; + net_pkt_header = (struct rpcap_pkthdr *) ((char *)p->buffer + sizeof(struct rpcap_header)); + net_pkt_data = (u_char *)p->buffer + sizeof(struct rpcap_header) + sizeof(struct rpcap_pkthdr); + ++ /* ++ * Step 1: to receive a message that does not immediately look ++ * malformed, consider it as a fixed-size rpcap general header followed ++ * by a variable-size rpcap general payload and require: ++ * ++ * - a complete rpcap general header to land in the buffer, and ++ * - the header to declare an rpcap general payload length that fits ++ * in the buffer after the header, and ++ * - the complete declared payload to land in the buffer after the ++ * header. ++ * ++ * Since this step loosely corresponds to rpcap_process_msg_header(), ++ * which among other things converts rpcap_header.plen to host byte ++ * order, mimic that as well to produce a valid argument for ++ * rpcap_check_msg_ver() later on. ++ */ + if (pr->rmt_flags & PCAP_OPENFLAG_DATATX_UDP) + { + /* Read the entire message from the network */ +@@ -470,6 +491,8 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + /* Interrupted receive. */ + return 0; + } ++ ++ // Require a complete rpcap general header to be present. + if ((size_t)msglen < sizeof(struct rpcap_header)) + { + /* +@@ -479,8 +502,18 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + "UDP packet message is shorter than an rpcap header"); + return -1; + } +- plen = ntohl(header->plen); +- if ((size_t)msglen < sizeof(struct rpcap_header) + plen) ++ gen_header->plen = ntohl(gen_header->plen); ++ ++ /* ++ * Validate the rpcap general payload length declared in the ++ * rpcap general header. Use subtraction to avoid an integer ++ * overflow: ++ * ++ * 0 <= gen_header->plen <= UINT32_MAX ++ * sizeof(struct rpcap_header) <= msglen <= p->bufsize ++ * p->bufsize is significantly less than UINT32_MAX ++ */ ++ if (gen_header->plen > (size_t)msglen - sizeof(struct rpcap_header)) + { + /* + * Message is shorter than the header claims it +@@ -495,6 +528,7 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + { + int status; + ++ // Receive a complete rpcap general header from the network. + if ((size_t)p->cc < sizeof(struct rpcap_header)) + { + /* +@@ -514,27 +548,35 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + return 0; + } + } ++ gen_header->plen = ntohl(gen_header->plen); + + /* +- * We have the header, so we know how long the +- * message payload is. The size we should get +- * is the size of the packet header plus the +- * size of the payload. ++ * Validate the rpcap general payload length declared in the ++ * rpcap general header. Use subtraction to avoid an integer ++ * overflow: ++ * ++ * 0 <= gen_header->plen <= UINT32_MAX ++ * sizeof(struct rpcap_header) < p->bufsize ++ * p->bufsize is significantly less than UINT32_MAX + */ +- plen = ntohl(header->plen); +- if (plen > p->bufsize - sizeof(struct rpcap_header)) ++ if (gen_header->plen > p->bufsize - sizeof(struct rpcap_header)) + { + /* + * This is bigger than the largest +- * record we'd expect. (We do it by +- * subtracting in order to avoid an +- * overflow.) ++ * record we'd expect. + */ + snprintf(p->errbuf, PCAP_ERRBUF_SIZE, + "Server sent us a message larger than the largest expected packet message"); + return -1; + } +- status = rpcap_read_packet_msg(pr, p, sizeof(struct rpcap_header) + plen); ++ ++ /* ++ * Receive the declared rpcap general payload from the network. ++ * ++ * p->cc == sizeof(struct rpcap_header) ++ * p->bp == p->buffer + sizeof(struct rpcap_header) ++ */ ++ status = rpcap_read_packet_msg(pr, p, sizeof(struct rpcap_header) + gen_header->plen); + if (status == -1) + { + /* Network error. */ +@@ -557,27 +599,36 @@ static int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr *pkt_header, u_ch + + /* + * We have the entire message. +- */ +- header->plen = plen; +- +- /* +- * Did the server specify the version we negotiated? ++ * Step 2: to validate the received message further, require: ++ * ++ * - the rpcap general header to have the correct version and type, and ++ * - the rpcap general payload to be large enough to contain at least a ++ * complete RPCAP_MSG_PACKET header, and ++ * - the RPCAP_MSG_PACKET header to declare an RPCAP_MSG_PACKET payload ++ * (i.e. the captured packet) length that fits in the rpcap general ++ * payload (not the entire buffer) after the RPCAP_MSG_PACKET header. + */ + if (rpcap_check_msg_ver(pr->rmt_sockdata, pr->data_ssl, pr->protocol_version, +- header, p->errbuf) == -1) +- { ++ gen_header, p->errbuf) == -1) ++ return 0; /* Return 'no packets received' */ ++ if (gen_header->type != RPCAP_MSG_PACKET) + return 0; /* Return 'no packets received' */ ++ if (gen_header->plen < sizeof(struct rpcap_pkthdr)) ++ { ++ snprintf(p->errbuf, PCAP_ERRBUF_SIZE, ++ "Received an incomplete RPCAP_MSG_PACKET header."); ++ return -1; + } +- + /* +- * Is this a RPCAP_MSG_PACKET message? ++ * Validate the RPCAP_MSG_PACKET payload length declared in the ++ * RPCAP_MSG_PACKET header. Use subtraction to avoid an integer ++ * overflow: ++ * ++ * 0 <= ntohl(net_pkt_header->caplen) <= UINT32_MAX ++ * sizeof(struct rpcap_pkthdr) <= gen_header->plen ++ * gen_header->plen is significantly less than UINT32_MAX + */ +- if (header->type != RPCAP_MSG_PACKET) +- { +- return 0; /* Return 'no packets received' */ +- } +- +- if (ntohl(net_pkt_header->caplen) > plen) ++ if (ntohl(net_pkt_header->caplen) > gen_header->plen - sizeof(struct rpcap_pkthdr)) + { + snprintf(p->errbuf, PCAP_ERRBUF_SIZE, + "Packet's captured data goes past the end of the received packet message."); diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb index 5f1506f8fc..3892454a40 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.4.bb @@ -23,6 +23,7 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \ file://04-CVE-2026-6244.patch \ file://05-CVE-2026-6554.patch \ file://06-CVE-2026-18313.patch \ + file://07-CVE-2026-18238.patch \ " SRC_URI[sha256sum] = "ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f"