summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-12-20 15:40:54 +0100
committerFlorian Westphal <fw@strlen.de>2023-12-20 16:26:30 +0100
commitb9e19cc396347df8c7f8cf5d14ba1d6172040f16 (patch)
treeb32162ee5340b71bc7fa2fcf64ca45a328ad9124 /tests/shell/testcases
parent588470e00539404fd793fe22718067721f5754be (diff)
netlink: fix stack overflow due to erroneous rounding
Byteorder switch in this function may undersize the conversion buffer by one byte, this needs to use div_round_up(). Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rw-r--r--tests/shell/testcases/bogons/nft-f/byteorder_switch_stack_overflow6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/shell/testcases/bogons/nft-f/byteorder_switch_stack_overflow b/tests/shell/testcases/bogons/nft-f/byteorder_switch_stack_overflow
new file mode 100644
index 00000000..01640528
--- /dev/null
+++ b/tests/shell/testcases/bogons/nft-f/byteorder_switch_stack_overflow
@@ -0,0 +1,6 @@
+table inet x {
+ chain nat_dns_acme {
+ udp length . @th,260,118 vmap { 47-63 . 0xe373135363130333131303735353203 : goto nat_dns_dnstc, }
+ drop
+ }
+}