From: Paul Moses <p@1g4.org>
To: netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
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>,
linux-kernel@vger.kernel.org, Paul Moses <p@1g4.org>
Subject: [PATCH net v2 0/2] net: sched: act_gate: fix update races and infoleak
Date: Tue, 20 Jan 2026 00:48:21 +0000 [thread overview]
Message-ID: <20260120004720.1886632-1-p@1g4.org> (raw)
This series fixes act_gate schedule update races by switching to a
prepare-then-swap model with an RCU-protected params pointer, so the
hrtimer/datapath never observe partially updated or freed schedules.
Old params are freed via call_rcu() after the swap.
It also zero-initializes the netlink dump struct to prevent padding
information leaks, and tightens schedule/timing validation to avoid
misprogramming the hrtimer on invalid inputs.
Changes since v1:
- Drop tc-testing changes; no test updates required
- Validation fixes: base/cycle range checks + derived cycle overflow guard
- Fix create/update corner cases: avoid oldp deref on create, publish params
only after full init, fix partial schedule copy cleanup
- Timer handling: cancel/reprogram only when required
- Keep dump struct zero-init without unrelated code motion
Patches:
1/2 net/sched: act_gate: fix schedule updates with RCU swap
2/2 net/sched: act_gate: zero-initialize netlink dump struct
--
2.52.GIT
next reply other threads:[~2026-01-20 0:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 0:48 Paul Moses [this message]
2026-01-20 0:48 ` [PATCH 1/2] net/sched: act_gate: fix schedule updates with RCU swap Paul Moses
2026-01-20 7:25 ` kernel test robot
2026-01-20 21:04 ` Victor Nogueira
2026-01-20 22:47 ` Paul Moses
2026-01-21 12:35 ` Victor Nogueira
2026-01-21 1:00 ` Paul Moses
2026-01-21 12:42 ` Victor Nogueira
2026-01-20 0:48 ` [PATCH 2/2] net/sched: act_gate: zero-initialize netlink dump struct Paul Moses
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=20260120004720.1886632-1-p@1g4.org \
--to=p@1g4.org \
--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=xiyou.wangcong@gmail.com \
/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