misc LLM fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | include: str_array.h: avoid oob readinclude/ | +4 | 0 replies | |
| 2/7 | src: chain: fix NFTNL_CHAIN_TYPE data_lensrc/ | +1 | 0 replies | |
| 3/7 | src: common: fix fd leak in nftnl_batch_is_supportedsrc/ | +4 | 0 replies | |
| 4/7 | expr: nftnl_expr_parse: use nftnl_expr_free on error unwindsrc/ | +1 | 0 replies | |
| 5/7 | src: flowtable: allow to unset NFTNL_FLOWTABLE_SIZEsrc/ | +1 | 0 replies | |
| 6/7 | src: utils: keep old name if strndup failssrc/ | +13 | 0 replies | |
| 7/7 | src: add and use nftnl_mem_blob for user_datainclude/ include/ include/ +9 more | +98 | 0 replies |
Reviews trailers per patch
None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Fernando Fernandez Mancera |
|---|---|
| Series | R-b |
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH libnftnl 0/7] misc LLM fixes
The only thing these changes have in common is that they are all LLM findings.
1) Prevent out-of-bounds read in str_array.h, this doesn't cause crash, the value that is read off the end of the array is not used.
2) Fix NFTNL_CHAIN_TYPE data_len to return the string length, consistent with other attributes.
3) Fix fd leak in nftnl_batch_is_supported when mnl_socket_bind() fails. Close the already-open socket on the error path.
4) Free partially-allocated sub-objects in nftnl_expr_parse error path via nftnl_expr_free. Fixes memory leaks (e.g., dynset set_name) when parsing embedded expressions fails after allocation.
5) Allow unsetting NFTNL_FLOWTABLE_SIZE.
6) Fix pointer state inconsistency by freeing the old value only after strndup succeeds. Delegate nftnl_parse_str_attr to the fixed helper instead of open-coding the same bug.
7) Add nftnl_mem_blob helper for user_data and switch all users to it, resolving inconsistent state on alloc failure.
Florian Westphal (7):
include: str_array.h: avoid oob read
src: chain: fix NFTNL_CHAIN_TYPE data_len
src: common: fix fd leak in nftnl_batch_is_supported
expr: nftnl_expr_parse: use nftnl_expr_free on error unwind
src: flowtable: allow to unset NFTNL_FLOWTABLE_SIZE
src: utils: keep old name if strndup fails
src: add and use nftnl_mem_blob for user_data
include/obj.h | 5 +---- include/rule.h | 5 +---- include/set.h | 5 +---- include/set_elem.h | 6 ++---- include/str_array.h | 8 ++++---- include/utils.h | 24 ++++++++++++++++++++++++ src/chain.c | 25 ++++++++----------------- src/common.c | 5 ++++- src/expr.c | 2 +- src/flowtable.c | 1 + src/object.c | 18 ++++++------------ src/rule.c | 41 +++++++++++++---------------------------- src/set.c | 18 ++++++------------ src/set_elem.c | 31 +++++++++++-------------------- src/table.c | 23 +++++++---------------- src/utils.c | 43 ++++++++++++++++++++++++++++++++----------- 16 files changed, 122 insertions(+), 138 deletions(-)
Signature · 1 line
2.55.0