🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6476

[BUG] net/sched: malformed TCA_STAB can leave failed qdisc change committed

#6476
From: shaos
Date: Thu, 22 Oct 2026 14:48
27 lines
9898 bytes
Hello,

Change an existing netem qdisc from 20 ms to 100 ms and include a malformed empty TCA_STAB in the same RTM_NEWQDISC request. qdisc_change() calls the qdisc callback before validating TCA_STAB, returns -EINVAL, but leaves the 100 ms option live.

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/faf3f124983448070e5242af5b3dd68d/raw/498cec333b632cbea7ffa02539d860e44d84c864/console-output.txt
kernel config:
https://gist.githubusercontent.com/shaos26/faf3f124983448070e5242af5b3dd68d/raw/5e0a640b23f7635af2334f3e1ff7cf185a620f1e/kernel-config.txt
reproducer:
https://gist.githubusercontent.com/shaos26/faf3f124983448070e5242af5b3dd68d/raw/ee84d2095025cc488421c5c2d9470604b456e73a/poc.c

Build the tested kernel with the attached configuration, boot it in disposable QEMU, compile poc.c statically and run in a network namespace with CAP_NET_ADMIN. The program creates netem, submits the mixed request and reads state back with RTM_GETQDISC.

Impact and prerequisites:
A caller with CAP_NET_ADMIN in the target namespace can receive an error while the device continues with the changed qdisc configuration. This is a control-plane atomicity/correctness defect; it does not cross a privilege boundary.

Validation: Four fresh exact-revision boots reproduced the state change. Invalid-STAB-only and patched-order controls left the old 20 ms setting unchanged.

Thanks,

shaos
Technical Details
Message-ID: <20261022144817.66648-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-350632-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-350632-linux-kernel-netdev=dewy.ru
From: shawnq1@163.com (shaos)
Newsgroups: linux.kernel.netdev
Subject: [BUG] net/sched: malformed TCA_STAB can leave failed qdisc change committed
Date: Thu, 22 Oct 2026 14:48:17 +0000
Organization: Usenet Network
Message-ID: <20261022144817.66648-1-shawnq1@163.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="237044"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:oxmtN7dOj1DhlQE6Uvsca4B3eeo= sha256:oe3+VpfHiFH2xdWBJI+BchfVQf+biiFMdyR8zqixwMY=
	sha1:pQtap76epZmP5h5b2BvnkqM9CNc= sha256:m9oTgKQMFi5Flor2G5fy/ECcS9+u6sDiHJ4TAaNTXK4=
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 7DBA31112BA; Thu, 22 Oct 2026 17:57:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.147
X-Spam-Status: No, score=-3.147 tagged_above=-9999 required=6.31
	tests=[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 l3HpCtGAdEPE;
	Thu, 22 Oct 2026 17:57:25 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-350632-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id B271B1112B1; Thu, 22 Oct 2026 17:57:16 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id C076060EE48; Thu, 22 Oct 2026 14:51:05 +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=1792680562;
	b=LDGh5r9L4Im2e+37GvbmTl8WNjIqxaCtroAJgqv7cFhD5cl/Nzde5M2732J52eI3YWO3
	 20Z7s3rztdxVj0/8Yy/mL5nx7KLzsMs47Xc0zTULGwYpAc35o61ihtzXTIDACv/vJd1da
	 OunhUnPutat4qyJ5z9Eza4KMyi/tft/p+/2umRgyVd5/HHv41ssxEtGAql97UaypztB/x
	 b3otgWtXQRlm0kNu7N7ovcC2Y9gqkt7pAmvuNc8zr73TceIki/NQ2VpfNuZwTeInY6/k8
	 W+qDYfUQ/ieGzMYw1x6m+yXxpyTR8KevDQ96+TNW1rcqXQNlgiMqiHt+TLvm9NVfNfA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792680562;
	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=VPRO3PXa2/zji34oyXe+9F8Yh09iar2A/K8GvPXivFM=;
	b=QrIRIrnu+8lu8CTERBbqz1y8TT0IiUKjqWlW86NVsAKC4dVPViykTD7A69IbD97a1ulv
	 eemjF0GgxqIU/erwxjrSw9XNIa1ZuECml7VL5nXyzN/7UI0AxIAebS3WvrZnUbmq0uw0A
	 qALTEa7hYyb79lGNU1WFCDlcSVdvc6ocK0a2Rn5C+m9WxKtWLn+MQGMgJlLl1mpOBewXF
	 S5iNmeZtJrMfmEsmrKHhCJ35X0bPrk8Ig6RdNi6xBhsFOfpci5uIOLF8swmoDQ3eZtTgD
	 6ecNdpqLuW3Wev5bhPI543x2YdQM0ih9mlGbg08lvjqxBIo/pLNR9XHg0WZ5rtAMQkg==
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=iVqaUuIK;
	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 175D6606A332;
	Thu, 22 Oct 2026 14:49:22 +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=iVqaUuIK
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.2
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792680551;
	b=qq9djyG/Zt6kGET7i+LAunXpUvOZfoISFdy2KYaQbzUVlQPt9etnNlFuszWpnqT5VhN5
	 IApuI0F0xjc7vCnPKaFhO6avXZDZO/qTHNB6M2fw9bKygpcAhKTWj7wyOIJooRiSf1Gtu
	 +Z6jm6G64PMJBhXzObNvfoWQJxCZ3gZhNBkbeMSs+m4+XdvhE/igti4qU+IXm897tZM2I
	 r9xx6mKOPhdaSx75B6gRrGnurxc58J57198JEzmpaDaQCpBR5oMB46yELLq/3uMuQDlu7
	 84F4jL8nKVyssHD1bCKs0hYQ5dlnY9weQlOAeIQYHnqir9Ip5XMsopT+nuJ/dOAbP4Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792680551;
	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=VPRO3PXa2/zji34oyXe+9F8Yh09iar2A/K8GvPXivFM=;
	b=xTLLhk5DaZDcw85RHXpHP3tlzy8nPkoTUYI2yEPDplKz8IyTGPVA9TZxkYcD9FQCQQ+2
	 hNl1geYhPWzxYHs3QB+lpibFSo3x8PPvfgVs76CRrPRsxvg4bReETA+ld5Gf3Dft/2PFQ
	 sQJrUq3QX7f5BLCv7WB5QEd9ltEa3BMNOjk9Z0GfNGYXTebNsHg6YgOSR8SlIHwPxBBUG
	 8Gvi6pDMpn1tH4GIGfVI1iL2YiZ1xvgqA3XDCfnFjanMtqxZnunfmXtyhyUf6jd9Tu+cQ
	 Agru7LpyV3yEwAe9fqBBPuAi1WfFl5ag3hT25ulybb9FYO4umqoqgCJWKEb6tIwjAVw==
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=iVqaUuIK;
	arc=none smtp.remote-ip=220.197.31.2
X-Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.2])
	(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 10FEB606A328;
	Thu, 22 Oct 2026 14:49:09 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 10FEB606A328
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=VP
	RO3PXa2/zji34oyXe+9F8Yh09iar2A/K8GvPXivFM=; b=iVqaUuIKuvHM1uKkKw
	KWHbolbzNZNxxkqSXDzgtm1dGrEP/6b9Idq0lq3lE0oleqnDDFg7Uv8y7QcBICqR
	Borezo+qqZLGvnc4s7a01jPLuE9JIfHiPyUEKPLUXqK6oJgiaqWlCR4bVTfl1T+r
	/0HbosZUNUHIBOepcHEftbi2k=
X-Received: from shaos.localdomain (unknown [])
	by gzga-smtp-mtada-g0-2 (Coremail) with SMTP id _____wD3P+ExItpqnVr8Bw--.21753S2;
	Thu, 22 Oct 2026 22:48:18 +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: _____wD3P+ExItpqnVr8Bw--.21753S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7Ar13JrWDWw18GFyrKFWrGrg_yoW8Ar18pr
	Wvya43tF1UKF45JFs7KF48u3W5Wrs7Ca1UKas5Gw48ZF98Cw1jkryrK347ZryUGr97K395
	Za90gayxKan5WaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
	9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07josjbUUUUU=
X-CM-SenderInfo: pvkd40jtr6il2tof0z/xtbC8RLl82raIjJK7QAA3y