Skip to content

netlink: add range checks for network byte integers

Florian Westphal netdev netfilter-devel 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2netlink: introduce NLA_POLICY_MAX_BEinclude/net/netlink.h lib/nlattr.c+36 -46 repliesApplied
2/2netfilter: nft_payload: reject out-of-range attributes via policynet/netfilter/nft_payload.c+3 -30 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/2R-b
2/2

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

Read the v1 thread

Cover letter [PATCH net-next 0/2] netlink: add range checks for network byte integers

NLA_POLICY_MAX() can be used to let netlink core validate that the given integer attribute is within the given min-max interval.

Add NLA_POLICY_MAX_BE to allow similar range check on unsigned integers when those are in network byte order (big endian).

First patch adds the netlink change, second patch adds one user.

Florian Westphal (2):
netlink: introduce NLA_POLICY_MAX_BE
netfilter: nft_payload: reject out-of-range attributes via policy

 include/net/netlink.h       |  9 +++++++++
 lib/nlattr.c                | 31 +++++++++++++++++++++++++++----
 net/netfilter/nft_payload.c |  6 +++---
 3 files changed, 39 insertions(+), 7 deletions(-)
Signature · 1 line
2.35.1