🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6477

[BUG] net/sched: cls_u32 accepts skip_sw without hardware offload

#6477
From: shaos
Date: Thu, 22 Oct 2026 14:47
31 lines
10452 bytes
Hello,

A software-only cls_u32 key-node filter is added with skip_sw and action drop. u32_change() passes the internal request flags instead of the parsed userflags to the key-node offload helper, so the filter is accepted, marked skip_sw not_in_hw, and skipped by software classification.

HEAD commit:    c03c1a14507dfaf8b856c2608f9ac216021fc222
git tree:       30fd2ef82912c26cf3a58ad0ba6afc375fa851ac
source version: Linux 7.3.0, local master
compiler:       gcc 11.4.0, GNU ld 2.38

console output:
https://gist.githubusercontent.com/shaos26/52214e44c4d45823a935cbd396412102/raw/aa356e9f13d5e6d7c721e69b35db0dbde2b97a38/console-output.txt
kernel config:
https://gist.githubusercontent.com/shaos26/52214e44c4d45823a935cbd396412102/raw/08cfe6b272327f21ad917ee22a487862bd57e280/kernel-config.txt
reproducer:
https://gist.githubusercontent.com/shaos26/52214e44c4d45823a935cbd396412102/raw/8087f854d32060878b4c9a50c4a80d357bd5c5ae/poc-init.sh
auxiliary reproducer (run-qemu.sh):
https://gist.githubusercontent.com/shaos26/52214e44c4d45823a935cbd396412102/raw/369242a1cc359378a8e841cb4373d447fc372ef2/run-qemu.sh
auxiliary reproducer (rebuild-initramfs.sh):
https://gist.githubusercontent.com/shaos26/52214e44c4d45823a935cbd396412102/raw/dfd743e0125beaef6d76fc1d7ed9ee2de67b6471/rebuild-initramfs.sh

Build the tested kernel with the attached configuration, then recreate the supplied minimal initramfs or use a test system with iproute2 tc. poc-init.sh runs the ordinary drop control, the skip_sw positive and a hash-node close control; run-qemu.sh is the archived guest launcher.

Impact and prerequisites:
A filter the administrator intended to require hardware offload is silently inactive, and matching traffic passes. The user must already hold CAP_NET_ADMIN in the namespace; this is a configuration/policy correctness bug, not a demonstrated boundary bypass against a different principal.

Validation: Two fresh exact-revision boots showed the skip_sw filter accepted and ping succeeding while the ordinary drop control blocked it. A two-line patched control rejected the filter with EOPNOTSUPP.

Thanks,

shaos
Technical Details
Message-ID: <20261022144752.64744-1-shawnq1@163.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350618-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350618-linux-kernel-netdev=dewy.ru
From: shawnq1@163.com (shaos)
Newsgroups: linux.kernel.netdev
Subject: [BUG] net/sched: cls_u32 accepts skip_sw without hardware offload
Date: Thu, 22 Oct 2026 14:47:52 +0000
Organization: Usenet Network
Message-ID: <20261022144752.64744-1-shawnq1@163.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="237091"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nJtxyRvevMiu/GtjiwR4tIvrecQ= sha256:r2csnTfzFajMi9V18wGOI5ReR319VIrwPLTUYlrAgCU=
	sha1:9V6bOzQtlOkACUTU0EqcDFeM7GU= sha256:OD6G/xhc3jymznA6CMWnXGO4mXn/K5gtSBaIgOXJuvQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 66CEA1112BB; Thu, 22 Oct 2026 17:57:36 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.047
X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=163.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id u0hCT7EVW_KS;
	Thu, 22 Oct 2026 17:57:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350618-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=163.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 421AE1112B7; Thu, 22 Oct 2026 17:57:25 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 5B6783EBAB; Thu, 22 Oct 2026 14:49:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792680512;
	b=BLI52IsPXlsQffheI7WCSvniORYeJZO6Z7U9h7fqhEWIPy9RhqgETPjYZsN2IBNYEYZF
	 YAqT+lRTMVzpbxMGRxWF1O+cdNZ2vuv5H5I9aasP5w7oDPHh/P1sNFq6tGyfnX2jXK8+9
	 jeOd6ZPBU7Vvp7FxtAXNVrR9Q/c4Xw9eqZzv0iFQt/+1jWT8AOcGDDGWuHEQoOJ6HzZKC
	 hWXpF3IfXBFeigOB26jSQumxgWWj1WI59kNVo7+q7AYCNE+YU575X7xh9O4/zQ9s17Rj5
	 rtKrz22Amd42jLeApTZn1Nx/gz8nU7J0oQxbJ4LOZxadrGAjLnIZhUtCX6shRx1usHw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792680512;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To:
	 Cc:Subject:Date:Message-Id:X-Mailer:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding:X-CM-TRANSID:
	 X-Coremail-Antispam:X-CM-SenderInfo;
	bh=fMe5vGbjlqstvJN2Ysj6tX7IwLJJrZLn3UmsYfquXgI=;
	b=5nDHbWSwDRmWUNSKa6+Ss1QvpjSr89BSTFMsuDUN6x1AR62uLNwg5s2bc/y0IR5TsS8L
	 B6LwEH5xOZnXx5tHbcm7FRBgnINJYVb9XQglNK2GtfZssv1FoEl60imHklYyIy3yjCGCZ
	 VT/DjL3X8HeZuTCsqRo8oo4NyQ7/L8bEyuus7hexe13ojx8WKsY1hyOkVuAneiqeliqu3
	 lQf5xwkoSnni04fMaRdbeIh7FYFxhryijxdpFLETuifLNz0vrtnxNR/c77oN0Zu1f8Py6
	 28QcQuAk+70bL7kO2nP4uxd+jd1F3P9ZxzJk0TOLPHMaYIBapkbUuQNnzEdZaR07xhQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Ox0C94J4;
	dmarc=pass header.from=163.com;
	spf=pass smtp.mailfrom=163.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 68E7A606A31B;
	Thu, 22 Oct 2026 14:48:32 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Ox0C94J4
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=117.135.210.5
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792680506;
	b=fktJmkFQjXcVrLpV/3Dd1KxOA96wkhBwUosnHR17cc6u5SNyOmTKTVlQGoiyYgI3sAqg
	 Dsujbn7oX6PPRzQuXiAAPukTvTP0En1c+dFvO4afZ52ZqZiRkw3Qx7TtpSH7CK4p4uuB8
	 yM3B7jC3rP4APTEDYDXm8reF1tArig1/hfWfexfS3oGKmL+fkQMXjXfO7k6+AjwKQ90Bj
	 ySbf9KJYQS10HzxMOI3Btj6ZthgyQhrnucSE7PTNAerUqnnFk43nbMY+3seQGvR4Nwf1d
	 NrJP72++oebe9LeOXV0R/AN7xqJSau/wxawqYrkWymDL9oKYGmTqDY7O+LmFCJ9rLYw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792680506;
	h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date:
	 Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding:
	 X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo;
	bh=fMe5vGbjlqstvJN2Ysj6tX7IwLJJrZLn3UmsYfquXgI=;
	b=yApEPhGd0ymURYKYLumGVQw8wBfdNMgKSBMLRQNN7sAowd/9zQC/lUKlT6hU2BkpU8LF
	 +OfChoJueTRCFMAdzqo+M3e0UMTSaXyVqaEq2NvqAikGly8hEt7OvBPXeOxvUiYrKBxbM
	 e/kiBY+jOy1Hg1RSson54Qpsc6KfPMgbwOTeivWS6vLzpVs9fpV9IfY0MXPF7JDSUR+Dh
	 E6ZR+mMJoG3eHPwNJSnDPM3EnjHakkn7kIvtU7pktgxMpMWBmyrFej9oCNzm2h7VmzS2T
	 KRqt4ikQUMFZVXkEVZwoRw8OINZcEz6yt01HxfKt9xOXkVH9NilT8D9r0oaX5DSfh3Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=163.com;
	spf=pass smtp.mailfrom=163.com;
	dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Ox0C94J4;
	arc=none smtp.remote-ip=117.135.210.5
X-Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 242CA606A32D;
	Thu, 22 Oct 2026 14:48:24 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 242CA606A32D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
	s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=fM
	e5vGbjlqstvJN2Ysj6tX7IwLJJrZLn3UmsYfquXgI=; b=Ox0C94J45ELoXyzkPN
	a+xXGq7lIF1AEHGK8ZegI2FxHy0jFYIKOALEUl0aUdKV4BRkMmzwZDuTRSWei/Yt
	puxP7NrB+gDxpYi4BP6DVbakDgAr4h5s1G3DL70tmWyvPTHpHLxaE5jBWj4OCsKA
	IHw+2JZOfkECbkUEVbrL4emRU=
X-Received: from shaos.localdomain (unknown [])
	by gzga-smtp-mtada-g1-4 (Coremail) with SMTP id _____wD3v9MYItpqDA3wBg--.30951S2;
	Thu, 22 Oct 2026 22:47:53 +0800 (CST)
X-Cc: Jiri Pirko <jiri@resnulli.us>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.34.1
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-CM-TRANSID: _____wD3v9MYItpqDA3wBg--.30951S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7Zry7uw17tF1xZw1fWrWkCrg_yoW8Kr1xpa
	9YkFWYva1qvan5J3WvkFWUXa1jg3y3Ja1UX3WDJF48Crsxuw12yrWfKa45Ca13Zrykua4S
	yr1Fg3Z7Xws8A3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
	9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07joYL9UUUUU=
X-CM-SenderInfo: pvkd40jtr6il2tof0z/xtbC8hnf7WraIhk2IAAA3E