Skip to content

netfilter: x_tables: use printk ratelimiting

Florian Westphal netfilter-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v17 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9netfilter: x_tables: remove pr_info where possiblenet/ipv4/netfilter/ipt_ECN.c net/netfilter/xt_CHECKSUM.c net/netfilter/xt_DSCP.c +4 more+16 -340 replies
2/9netfilter: x_tables: use pr ratelimiting in xt corenet/netfilter/x_tables.c+34 -360 replies
3/9netfilter: xt_CT: use pr ratelimitingnet/netfilter/xt_CT.c+13 -120 replies
4/9netfilter: xt_NFQUEUE: use pr ratelimitingnet/netfilter/xt_NFQUEUE.c+5 -30 replies
5/9netfilter: xt_set: use pr ratelimitingnet/netfilter/xt_set.c+25 -250 replies
6/9netfilter: bridge: use pr ratelimitingnet/bridge/netfilter/ebt_among.c net/bridge/netfilter/ebt_limit.c+7 -70 replies
7/9netfilter: x_tables: rate-limit table mismatch warningsnet/ipv4/netfilter/ipt_rpfilter.c net/ipv6/netfilter/ip6t_rpfilter.c net/netfilter/xt_CONNSECMARK.c +1 more+8 -80 replies
8/9netfilter: x_tables: use pr ratelimiting in matches/targetsnet/netfilter/xt_HMARK.c net/netfilter/xt_addrtype.c net/netfilter/xt_policy.c+40 -330 replies
9/9netfilter: x_tables: use pr ratelimiting in all remaining spotsnet/ipv4/netfilter/ipt_ECN.c net/ipv4/netfilter/ipt_REJECT.c net/ipv4/netfilter/ipt_rpfilter.c +31 more+116 -1040 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 nf 0/9] netfilter: x_tables: use printk ratelimiting

Aeons ago, before namespaces, there was no need to ratelimit this:
all of these error messages got triggered in response to iptables commands, which need CAP_NET_ADMIN.

Nowadays we have namespaces, so its better to ratelimit these. This should also help fuzzing (syzkaller), as it can generate a large volume of error messages (which are useless there).

First patch get rid of printks that should never be triggered, as userland doesn't generate such malformed rules.

The other patches convert all matches/targets.

In some cases, modules used pr_err() for errors that are just a hint to and user as to why the rule was rejected, so this uses pr_info_ratelimited everywhere.

Only exceptions are when the error appears to be due to a bug, i.e. ABI breakage and other incompatible changes that should not happen.

Note that most patches introduce overly long lines, but splitting these would make it necessary to split the error messages which is worse.

 46 files changed, 264 insertions(+), 262 deletions(-)