All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH 0/4] Continue upon netlink deserialization failures
@ 2025-05-21 13:12 Phil Sutter
  2025-05-21 13:12 ` [nft PATCH 1/4] netlink_delinearize: Replace some BUG()s by error messages Phil Sutter
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Phil Sutter @ 2025-05-21 13:12 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel

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(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-05-25  7:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 13:12 [nft PATCH 0/4] Continue upon netlink deserialization failures Phil Sutter
2025-05-21 13:12 ` [nft PATCH 1/4] netlink_delinearize: Replace some BUG()s by error messages Phil Sutter
2025-05-21 13:12 ` [nft PATCH 2/4] netlink: Pass netlink_ctx to netlink_delinearize_setelem() Phil Sutter
2025-05-21 13:12 ` [nft PATCH 3/4] netlink: Keep going after set element parsing failures Phil Sutter
2025-05-21 14:17   ` Pablo Neira Ayuso
2025-05-21 17:19     ` Phil Sutter
2025-05-22 17:17       ` Pablo Neira Ayuso
2025-05-21 13:12 ` [nft PATCH 4/4] cache: Tolerate object deserialization failures Phil Sutter
2025-05-22 17:18 ` [nft PATCH 0/4] Continue upon netlink " Pablo Neira Ayuso
2025-05-25  7:58   ` Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.