Skip to content

net: sched: act_gate: fix update races and infoleak

Paul Moses lkml llvm netdev oe-kbuild-all stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 5 repliesIn review

Changes in v2 from the cover letter

- 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 in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/sched: act_gate: fix schedule updates with RCU swapinclude/net/tc_act/tc_gate.h net/sched/act_gate.c+270 -775 replies
2/2net/sched: act_gate: zero-initialize netlink dump structnet/sched/act_gate.c+4 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net v2 0/2] net: sched: act_gate: fix update races and infoleak

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