diff options
author | Florian Westphal <fw@strlen.de> | 2025-03-31 16:47:11 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2025-06-05 15:37:43 +0200 |
commit | 18c24d89b9977ddc0900be64fe9e95e7ac1ce896 (patch) | |
tree | fb81f1bf04475e2484bbf53e4515430c90d2749e /tests/shell | |
parent | 69b90023c7220fe283ee38686c758e3494e853d9 (diff) |
json: work around fuzzer-induced assert crashes
fuzzer can cause assert failures due to json_pack() returning a NULL
value and therefore triggering the assert(out) in __json_pack macro.
All instances I saw are due to invalid UTF-8 strings, i.e., table/chain
names with non-text characters in them.
Work around this for now, replace the assert with a plaintext error
message and return NULL instead of abort().
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell')
-rw-r--r-- | tests/shell/testcases/bogons/nft-j-f/Assertion__out_failed_assert | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/shell/testcases/bogons/nft-j-f/Assertion__out_failed_assert b/tests/shell/testcases/bogons/nft-j-f/Assertion__out_failed_assert new file mode 100644 index 00000000..f8ce0895 --- /dev/null +++ b/tests/shell/testcases/bogons/nft-j-f/Assertion__out_failed_assert @@ -0,0 +1,6 @@ +table ip test-ip { + quota htquota { comment "tŽst5" 5 kbytes + } +} +list ruleset +add rule t c counter |