From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796045790; b=Gg6EzLE1C19P7t45EooTEusO3f0GKlkABDpchTzkND3GqSIhAK+nSVtE9DWsXL1pw1Vs MTDKhzvt/ukOAaGUXdSEdENJB+UqcYNF1NXZmuk7jDy066rh+/lsFCivWp+tc8VtYz84i lJ92s/YHScoou0nWTru47G60lnuy1d5+d1XGjI9jli7WIpJ/OuXBBuBUdAoOrW0xUWygI Aehi8fM5RZv+JiHfYzXiJ7/ceHSoWdOqDj/4icChvxOBtST6HUzvdMEADGMnCfzb8rz/e Y1mwxcMx/v72F2J682b4HRRBc/oJvysVCV+Mey2JsFYm0oxgkAPHRLrShkYspKrJZGw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045790; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=BOToKMcLPgzfZiUC/oq0eswf6g5p1C1x6HvYJazeMX8=; b=JITF0BfLH12pxDul2of8NzpdYGR7v/eClhFhRN15483XCGnF1ULLmEQlX7CLqLYlhKkP sOlQCa+c+ngQsQvRxlQRQU/bDmc/qSZmii/IGKDjoGr2R4265pk53MMlMxOz2PDNCoALs 4FMVKNa1xrTYHaUnusFzvwDXkXOaJzkqRtXGfcZFO9aQ0VDgE2NzvYjojObPq6Itt3ESO q5auRxW9rwAAGJiaYZyqQbHmyafFM8+fOyJZk90JvBuY4T4HMZ3UXQPK6WnW3vjDZE/QE krCMtkips7HE2KcLIFty32LxwUqyPLmy9EJeyog6RR8S5GmbyGY1tyxHRfv9vCYqXUw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=EkOPLI0C; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ADEB606A31C for ; Mon, 30 Nov 2026 13:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=EkOPLI0C Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC0161F00898; Mon, 30 Nov 2026 13:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796045789; bh=BOToKMcLPgzfZiUC/oq0eswf6g5p1C1x6HvYJazeMX8=; h=From:To:Cc:Subject:Date:Reply-To; b=EkOPLI0C0fpxHelnsz154Xwhe/G/ZmM4Oqgyfyhk+unvjCNP+aNy1CqwB1aag28AC 8ueqfn8IqtiJLPu8h3t/oOGAyLERbIvCgSlmUusdL9hE/OhrlMS4uQl5pztgaVfcB2 rs/2mN87RiVY1BUWQQycXtv7adxe8/OEugdQf70o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-100018: netdevsim: reject cls_bpf programs bound to another device Date: Mon, 30 Nov 2026 14:23:23 +0100 Message-ID: <2026113010-CVE-2026-100018-87db@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4999; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GJ6gQWsAm1QDAFVoEqPmzUZC4+spyJUYJWPHmQ6YQlA=; b=kA0DAAIRMUfUDdst+ykByyZiAGsNeL6ilz8tdidz6FiA7qJhzm/y+gPQt9Q39+7xNOq7OLmwm 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmsNeL4ACgkQMUfUDdst+ylj/ACfRq6E IFxx1Rs/+0SQHS/szaee3rkAn1ilx8yvci67VS1xwVeZBF5wY09y X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: netdevsim: reject cls_bpf programs bound to another device The issue: nsim_bpf_setup_tc_block_cb() installs any device-bound SCHED_CLS program without checking that its offload device matches the target netdev. The core cls_bpf attach path rejects a mismatching program, but a netdev that joins a shared block later is replayed the stored filter by cls_bpf_reoffload() before it is inserted into block->ports, so the attach-time check cannot see it. The driver callback is the authoritative per-device acceptance boundary and must enforce the match itself, as nfp already does in nfp_net_bpf_offload(). Without the check, replaying a device-bound program onto a different bpf_offload_dev installs it into that device's netdevsim state, which trips the WARN in nsim_bpf_uninit() (ns->bpf_offloaded set on a foreign device) and can dereference a NULL prog->aux->offload in nsim_prog_set_loaded(). The Fix: Reject a device-bound program whose offload device does not match the target netdev, with -EINVAL and an extack so the rejected replay is not silent. The check is intentionally narrower than nfp's: it fires only for a dev-bound program, so nsim's bpf_tc_non_bound_accept mode (which admits an unbound program onto the device) is unaffected. Teardown is never blocked: the guard is on the program being installed and an unbind passes cls_bpf.prog = NULL. Conditions to recreate the bug: - CONFIG_NETDEVSIM=y, CONFIG_NET_CLS_BPF=y - load and pin a dev-bound SCHED_CLS program for netdevsim device B - install the program on a shared block owned by B - add an independently backed netdevsim device C to that block; the bind replays the filter to C's callback, and C's ports/0/bpf_offloaded_id takes the B-bound program id. The reported Sashiko review is at https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260809094418.901607-1-jhs@mojatatu.com The Linux kernel CVE team has assigned CVE-2026-100018 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 5.10.275 with commit 40a0adc98895d09b42d9bb9f835f6dff2f33c4e3 Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 5.15.226 with commit dcc30b18a028cce7679cbcbb49c72921f8f5d52a Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 6.1.193 with commit 349f1e431d03a97e9bd160429fd0fe0a67a063b0 Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 6.6.163 with commit 6f5e04e73f60e122b1a9ff20256a74617f8954dc Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 6.12.117 with commit 16ec59a2a59a1beda422c24f33bba5b09ac1a36c Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 6.18.63 with commit c59b5fcbc7b777bcf89a976af57f52a95ba42b6f Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 7.3.4 with commit 6b48deba1968a573eba8a26981c8431366779518 Issue introduced in 4.16 with commit 31d3ad832948c75139b0e5b653912f7898a1d5d5 and fixed in 7.4-rc1 with commit 5820ca58b409402505b9e904d1ded4908e0b6b81 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-100018 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/netdevsim/bpf.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/40a0adc98895d09b42d9bb9f835f6dff2f33c4e3 https://git.kernel.org/stable/c/dcc30b18a028cce7679cbcbb49c72921f8f5d52a https://git.kernel.org/stable/c/349f1e431d03a97e9bd160429fd0fe0a67a063b0 https://git.kernel.org/stable/c/6f5e04e73f60e122b1a9ff20256a74617f8954dc https://git.kernel.org/stable/c/16ec59a2a59a1beda422c24f33bba5b09ac1a36c https://git.kernel.org/stable/c/c59b5fcbc7b777bcf89a976af57f52a95ba42b6f https://git.kernel.org/stable/c/6b48deba1968a573eba8a26981c8431366779518 https://git.kernel.org/stable/c/5820ca58b409402505b9e904d1ded4908e0b6b81