Skip to content

Continue upon netlink deserialization failures

Phil Sutter netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4netlink_delinearize: Replace some BUG()s by error messagessrc/netlink_delinearize.c+11 -60 replies
2/4netlink: Pass netlink_ctx to netlink_delinearize_setelem()include/netlink.h src/monitor.c src/netlink.c+12 -120 replies
3/4netlink: Keep going after set element parsing failuressrc/netlink.c+3 -13 replies
4/4cache: Tolerate object deserialization failuressrc/cache.c+5 -60 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPablo Neira Ayuso
SeriesR-b
1/4
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [nft PATCH 0/4] Continue upon netlink deserialization failures

Faced with unexpected values or missing attributes, most of the netlink deserialization code would complain, drop the nftables object being constructed and carry on. Some error paths though instead call BUG() or assert(0) instead. This series eliminates at least the most prominent ones among those (patches 1 and 3).

Patch 4 prevents object deserialization from aborting upon the first one with unexpected data. If netlink_delinearize_obj() returns NULL, an error message has been emitted already so just return 0 to the foreach loop so it continues with the next object.

Patch 2 is just preparation work for patch 3.

Phil Sutter (4):
netlink_delinearize: Replace some BUG()s by error messages
netlink: Pass netlink_ctx to netlink_delinearize_setelem()
netlink: Keep going after set element parsing failures
cache: Tolerate object deserialization failures

 include/netlink.h         |  6 +++---
 src/cache.c               | 11 +++++------
 src/monitor.c             |  7 +++----
 src/netlink.c             | 15 +++++++++------
 src/netlink_delinearize.c | 17 +++++++++++------
 5 files changed, 31 insertions(+), 25 deletions(-)
Signature · 1 line
2.49.0