Skip to content

net/sched: act_ipt bug fixes

Florian Westphal netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 10 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net/sched: act_ipt: add sanity checks on table name and hook locationsnet/sched/act_ipt.c+20 -70 repliesApplied
2/3net/sched: act_ipt: add sanity checks on skb before calling targetnet/sched/act_ipt.c+33 -00 repliesApplied
3/3net/sched: act_ipt: zero skb->cb before calling targetnet/sched/act_ipt.c+10 -00 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon HormanJamal Hadi Salim
1/3R-b A-b
2/3R-b A-b
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net v3 0/3] net/sched: act_ipt bug fixes

v3: prefer skb_header() helper in patch 2. No other changes. I've retained Acks and RvB-Tags of v2.

While checking if netfilter could be updated to replace selected instances of NF_DROP with kfree_skb_reason+NF_STOLEN to improve debugging info via drop monitor I found that act_ipt is incompatible with such an approach. Moreover, it lacks multiple sanity checks to avoid certain code paths that make assumptions that the tc layer doesn't meet, such as header sanity checks, availability of skb_dst, skb_nfct() and so on.

act_ipt test in the tc selftest still pass with this applied.

I think that we should consider removal of this module, while this should take care of all problems, its ipv4 only and I don't think there are any netfilter targets that lack a native tc equivalent, even when ignoring bpf.

Florian Westphal (3):
net/sched: act_ipt: add sanity checks on table name and hook locations net/sched: act_ipt: add sanity checks on skb before calling target net/sched: act_ipt: zero skb->cb before calling target

 net/sched/act_ipt.c | 70 ++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 63 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.3