netlink: meta: fix wrong type in attributes
Florian Westphal
maintainerPATCH 1/1 netlink: meta: fix wrong type in attributes
We segfault on 'list filter' when meta expr is used as _u8 returns invalid register 0.
--- src/netlink_delinearize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/netlink_delinearize.c +2 -2
@@ -346,9 +346,9 @@ static void netlink_parse_meta_sreg(struct netlink_parse_ctx *ctx,struct expr *expr; expr =netlink_get_register (ctx, loc, -nft_rule_expr_get_u8 (nle,NFT_EXPR_META_SREG )); +nft_rule_expr_get_u32 (nle,NFT_EXPR_META_SREG )); stmt =meta_stmt_alloc (loc, -nft_rule_expr_get_u8 (nle,NFT_EXPR_META_KEY ), +nft_rule_expr_get_u32 (nle,NFT_EXPR_META_KEY ), expr);expr_set_type (expr, stmt->meta.tmpl->dtype, stmt->meta.tmpl->byteorder);
Signature · 1 line
1.8.1.5
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.
This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
On a side note: there's no reason to have our releases timed after kernel releases. At this point I'd rather go for more frequent releases of the current code instead of backporting fixes.
Quoted 28 lines
Signed-off-by Florian Westphal <[email protected]>--- src/netlink_delinearize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)src/netlink_delinearize.c +2
-2@@ -346,9 +346,9 @@ static void netlink_parse_meta_sreg(struct netlink_parse_ctx *ctx,struct expr *expr; expr =netlink_get_register (ctx, loc, -nft_rule_expr_get_u8 (nle,NFT_EXPR_META_SREG )); +nft_rule_expr_get_u32 (nle,NFT_EXPR_META_SREG )); stmt =meta_stmt_alloc (loc, -nft_rule_expr_get_u8 (nle,NFT_EXPR_META_KEY ), +nft_rule_expr_get_u32 (nle,NFT_EXPR_META_KEY ), expr);expr_set_type (expr, stmt->meta.tmpl->dtype, stmt->meta.tmpl->byteorder);Signature · 6 lines
1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso
maintainerQuoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
Please, go ahead with that.
Quoted 3 lines
On a side note: there's no reason to have our releases timed after kernel releases. At this point I'd rather go for more frequent releases of the current code instead of backporting fixes.
We can probably point to the nftables git snapshots from the website and make the releases when we consider that there a good number of relevant changes/fixes to make an announce.
Quoted 10 lines · Pablo Neira Ayuso
Quoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
Please, go ahead with that.
Done.
Quoted 7 lines
Quoted 3 lines
On a side note: there's no reason to have our releases timed after kernel releases. At this point I'd rather go for more frequent releases of the current code instead of backporting fixes.
We can probably point to the nftables git snapshots from the website and make the releases when we consider that there a good number of relevant changes/fixes to make an announce.
Yeah, we can switch to a different model once things have calmed down a little. Probably still should aim for a new release by 3.14, maybe earlier, so people can use the new stuff.
Florian Westphal
maintainerQuoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
I am now on 0545e0c13b as head but I still get segfault:
$ nft add rule filter output meta mark set 42 $ nft list table -> segv
.. and my patch should still apply afaics.
Pablo Neira Ayuso
maintainerQuoted 9 lines · Florian Westphal
Quoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
Quoted 6 lines
I am now on
0545e0c13bas head but I still get segfault:$ nft add rule filter output meta mark set 42 $ nft list table -> segv.. and my patch should still apply afaics.
I'm going to apply your patch to master. Thanks Florian.
Quoted 9 lines · Florian Westphal
Quoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
Quoted 6 lines
I am now on
0545e0c13bas head but I still get segfault:$ nft add rule filter output meta mark set 42 $ nft list table -> segv.. and my patch should still apply afaics.
Right, we've fixed that for other types. Please push your patch to master.
We should probably add a big warning to libnftnl for these cases or even an assert() since its misuse of the API that leads to hard to debug problems.
Pablo Neira Ayuso
maintainerQuoted 15 lines · Patrick McHardy
Quoted 14 lines · Florian Westphal
Quoted 7 lines · Patrick McHardy
Quoted 2 lines · Florian Westphal
We segfault on 'list filter' when meta expr is used as
_u8returns invalid register 0.This seems to only affect the master branch. Not sure how many people are using that and if its worth doing a new release. I'd rather merge the next-3.14 branch and have people use that.
I am now on
0545e0c13bas head but I still get segfault:$ nft add rule filter output meta mark set 42 $ nft list table -> segv
Quoted 7 lines
Quoted 1 line
.. and my patch should still apply afaics.
Right, we've fixed that for other types. Please push your patch to master.
We should probably add a big warning to libnftnl for these cases or even an
assert()since its misuse of the API that leads to hard to debug problems.
Indeed. I started a patch for that here but failed to find time so far to finish it, it should help to catch wrong API uses.