Article View: linux.kernel.netdev
Article #6487[BUG] net/sched: rejected GRED change can still update TCA_GRED_LIMIT
From: shaos
Date: Thu, 22 Oct 2026 14:48
Date: Thu, 22 Oct 2026 14:48
27 lines
9751 bytes
9751 bytes
Hello, On an existing GRED qdisc, RTM_NEWQDISC sets TCA_GRED_LIMIT=1234 while supplying invalid TCA_GRED_DPS.DPs=0. gred_change() commits the limit before table validation returns -EINVAL. 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/563fcf9f7c2144e0750f9ce9aef7f6ff/raw/18bf75ffee3a3587a962770c34af2301fb1c098d/console-output.txt kernel config: https://gist.githubusercontent.com/shaos26/563fcf9f7c2144e0750f9ce9aef7f6ff/raw/817a9271004049a448c2124d7a51e6d62e8ddc7e/kernel-config.txt reproducer: https://gist.githubusercontent.com/shaos26/563fcf9f7c2144e0750f9ce9aef7f6ff/raw/0b53273f9f8cd884092267d61110aed70f6233a4/poc.c Build the tested kernel with the attached configuration and run static poc.c in a disposable network namespace with CAP_NET_ADMIN. It creates the GRED qdisc, sends the invalid mixed request and reads the limit back. Impact and prerequisites: A caller with CAP_NET_ADMIN in the namespace receives an error but the packet limit changes from 2000 to 1234. This is a control-plane atomicity defect with no demonstrated privilege escalation. Validation: Two fresh exact-revision QEMU boots reproduced the change; omitting the limit and using a patched validation order both preserved 2000. Thanks, shaos
Technical Details
Message-ID:
<20261022144808.65885-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-350625-linux-kernel-netdev=dewy.ruShow 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-350625-linux-kernel-netdev=dewy.ru From: shawnq1@163.com (shaos) Newsgroups: linux.kernel.netdev Subject: [BUG] net/sched: rejected GRED change can still update TCA_GRED_LIMIT Date: Thu, 22 Oct 2026 14:48:08 +0000 Organization: Usenet Network Message-ID: <20261022144808.65885-1-shawnq1@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="240432"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:eYKN8S7AF199qov8+ISf3rt6pyI= sha256:KUUlQIoCQ5UKDy/mPGRhnxumKs7I41sxDywkmnxDSNg= sha1:mpDPjsJvSbqcNJ+xDipeEWExGDc= sha256:mXqxFqgyuAytzeTqCj+L8Wn71NwbUx535BCbxT1/LGM= 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 D7DA31112C8; Thu, 22 Oct 2026 18:09:46 +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 1z7f1mgPildF; Thu, 22 Oct 2026 18:09:42 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-350625-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 137F411129C; Thu, 22 Oct 2026 18:09:34 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id ABB6D312F8; Thu, 22 Oct 2026 14:49:49 +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=1792680529; b=foohIx8pLeFESjZ1BgdHFpGCuUCQt0qUkX8ZOQ9VMr/H6lYF2uullJxIjEo53uUz2lrE j3VuHb2P6kkG+jQGR7t5QUVmHojILlqL8L9SXQR9CVLi+6kdHJ2+lXOhsJ+bpuTSU5Tgh CABZtc+h6zQHa83LdmhteisJmB66XZEdCtDwDmTwGLTMsM9pQrNUpYxLDTNJFdcAa0ZIS /9KlxkCOZaM4wGPi+briOnHK54G7u4zwwuY+7BtM3bsYL0pQL/PXXzDJprgmKm8nLwfFe phVACpU06KL/j0SPUK7M11jaKRREeEYM8/SCrpHV0Edh2qvqBnl5UnV+wsvC/xcxFbQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792680529; 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=5c3xQVElowUfLrTzEWstHGeY2ZjYqm7kADYcumVcXW0=; b=5WrKytbWoG66UUcIqNPoh3XmTGjI0w9yWLUMsF/JN199BuJsBB8UBfFbiOy739pN53aL Kn+8YHjZZSoHmmva0zA1D7WXwkCE9W4tvhikAI/plozxJuP1zRpCvUfVjgzkjKqNrEkm1 zvEVgRWzP4FApw2O4RRbrqdOSkUm+HWZB9HAerAx1aPSK5ljKQkFx2pon8VB+nGITXvdW evB9I6Ebkt/mwv8+9W4lSSbj7JQOA2WBg6konrsKgCpLk5Tdnm2jYaAXhvI2cz4jBZ0Yl q0J0fYyru4YVVFS+ub8tWrHEXq67krWQxli+iAILq7rYXUBvYSdo5sQgnJqQiCWopcg== 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=doedaK+U; 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 A518060A5BD4; Thu, 22 Oct 2026 14:48:49 +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=doedaK+U X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.3 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792680523; b=MOjt9hRhuJvs4Dp2FcCGvO7IXnQfjGoVnHhUCMWYPKrPQivPyq60maPS4Bsub8yoyjnV 9WjTkYhAhz8pmibMLaffEQa3OdqFz1M6P7G/W1GhWe8KYoT897chyasYB1/hkPLCnNdiC /8TefjDll572C0kw6UVCzvvCAZ6PfsFUcK2dN8OJlBDQOSRogrj52+PDbd050GgqyUtZw f5eHDr+ZLlgSsp4GZY/w0rLvGZfylE6/nyT92VxYQGzLLA1Pk3p2mBDpiAm202e9tE8+q il6mFJHblGDMyi4gt4CWzmw/v6yJ63yyRnTfIil7lPBNAC2HtktBiVhEn4Ja7Zg3cww== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792680523; 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=5c3xQVElowUfLrTzEWstHGeY2ZjYqm7kADYcumVcXW0=; b=ageLDP8l/GSq0yH7ASSk4bzXrjMoIgg98+f6jWa/txOlQCrPHq3ieb6JLBiLw4B0aB2p uFHPXpIEKs1mtKmTI8b/MGD66TOB/Jrf1RWfIIzbNlGsc8helOLJt7CoWAP3Jtt89B7i3 lyMavfe2K0eRGocWyjSw94t67Ft5UeZWbWuUgOVUh0aWKQxl4L2KLBn+arMqRYw3RCOIS ckVbIPiEQdtc734fqYOkKGf/qOhqjnjjaRFmHKdC7CjnX+1CkcTvZRqGP9mPWCMPhTRQR xOLlwj2cn0ogZGwRAq/1tm8E36mQoNyEWT7/Rf93VnnTeM2Th6hCEFanwOtQrRDyhew== 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=doedaK+U; arc=none smtp.remote-ip=220.197.31.3 X-Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) (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 8210B60A4AD2; Thu, 22 Oct 2026 14:48:42 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8210B60A4AD2 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=5c 3xQVElowUfLrTzEWstHGeY2ZjYqm7kADYcumVcXW0=; b=doedaK+UUhIbfvBndN Iv4gmZW5OyfVt7NYX5bg6rXwaWBfpea3vYBczXBD5ccqoTQUJINXLZi9GMzdN/sm snyjAEyv8Z+HzQGPQgWUHXk6NU/GBc8WLYhAc2zvY50qnJSgi6zV5zTYpdbdaZvF K0P8oO3Gnf+ayXqvF0G7ULYOY= X-Received: from shaos.localdomain (unknown []) by gzsmtp2 (Coremail) with SMTP id PSgvCgDnph0oItpql9hbBQ--.32871S2; Thu, 22 Oct 2026 22:48:09 +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: PSgvCgDnph0oItpql9hbBQ--.32871S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7AF1xZF47XF1rKF4rGw4DJwb_yoW8Xw1Up3 9Yv398tay8uF45Xas7KrW8W3WUWrZay3y7Gwn5Xw1DZFsxuw1qkryxt3y2kF9xWry8GFWI v3y0gaykGayrWr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jo7KsUUUUU= X-CM-SenderInfo: pvkd40jtr6il2tof0z/xtbCzwnj8WraIinLzgAA3q