From: shaos <shawnq1@163.com>
To: jhs@mojatatu.com
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,
security@kernel.org
Subject: [BUG] net/sched: TEQL qdisc can modify init-net teql0 from another netns
Date: Thu, 22 Oct 2026 14:48:30 +0000 [thread overview]
Message-ID: <20261022144830.67948-1-shawnq1@163.com> (raw)
Hello,
A process running as UID/GID 65534 creates a user and network namespace, sets a namespace-local dummy device to MTU 60000, and installs a root qdisc of kind teql0. TEQL reuses its global master and changes the init network namespace teql0 device from MTU 1500 to 60000.
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/5a9460785f381e5feb8decc5dead00b8/raw/a87637a25fcc759de83709b4fb0fe8f7cb03d089/console-output.txt
kernel config:
https://gist.githubusercontent.com/shaos26/5a9460785f381e5feb8decc5dead00b8/raw/8039a72c1de72497f040f40b7507fd8d2103425d/kernel-config.txt
reproducer:
https://gist.githubusercontent.com/shaos26/c800422c572d258de956971217d3b6dc/raw/53eca8ea2f399fd3de75aa2b38423c3928c9825a/poc.c
Build the tested kernel with the attached configuration, compile the reproducer, and boot it in a disposable QEMU VM with TEQL enabled. The reproducer creates user and network namespaces as an unprivileged UID, then sends the netlink requests.
Impact and prerequisites:
This crosses a network-namespace boundary: an unprivileged user-namespace process changes a globally visible network device. The reproducer also shows that a direct unprivileged MTU change in the initial namespace is denied and a pfifo control does not change teql0.
Validation: Two fresh QEMU boots at the exact v7.3 revision reproduced the change. The pfifo and direct-EPERM controls passed.
Thanks,
shaos
next reply other threads:[~2026-10-22 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 14:48 shaos [this message]
2026-10-22 16:24 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022144830.67948-1-shawnq1@163.com \
--to=shawnq1@163.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=security@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®