summaryrefslogtreecommitdiffstats
path: root/tests/regression/ip/dnat.t.payload.ip
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-07-17 14:38:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-07-17 14:42:50 +0200
commitefd09355038d53fdd3841ab5ccae1543c4967daf (patch)
tree3e0bb61b27fdb8ec4ffe0900cf418e980f811f03 /tests/regression/ip/dnat.t.payload.ip
parent1ddd74855032015195a8d87c0b650f1ce73db375 (diff)
netlink_delinearize: meta l4proto range printing broken on 32bit
Florian Westphal says: 09565a4b1ed4863d44c4509a93c50f44efd12771 ("netlink_delinearize: consolidate range printing") causes nft to segfault on 32bit machine when printing l4proto ranges. The problem is that meta_expr_pctx_update() assumes that right is a value, but after this change it can also be a range. Thus, expr->value contents are undefined (its union). On x86_64 this is also broken but by virtue of struct layout and pointer sizes, value->_mp_size will almost always be 0 so mpz_get_uint8() returns 0. But on x86-32 _mp_size will be huge value (contains expr->right pointer of range), so we crash in libgmp. Pablo says: We shouldn't call pctx_update(), before the transformation we had there a expr->op == { OP_GT, OP_GTE, OP_LT, OP_LTE }. So we never entered that path as the assert in payload_expr_pctx_update() indicates. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Tested-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/regression/ip/dnat.t.payload.ip')
0 files changed, 0 insertions, 0 deletions