path: root/iptables/xtables-standalone.c
diff options
authorPablo Neira Ayuso <>2013-11-26 13:09:13 +0100
committerPablo Neira Ayuso <>2013-12-30 23:50:54 +0100
commit5eed9118f2620ac07edd553599e2415f00d6f8f3 (patch)
tree4d4592b5ed03fb7112a70b5f2cd37491f0e8cecf /iptables/xtables-standalone.c
parentee595bc702ca80f72c522406f6a06ba7c31eb8df (diff)
nft: fix out of bound memory copy
Valgrind reports an invalid read after a memory block: ==11114== Invalid read of size 8 ==11114== at 0x4C2DB02: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:877) ==11114== by 0x41788E: add_match (nft.c:781) ==11114== by 0x41B54C: nft_ipv4_add (nft-ipv4.c:72) ==11114== by 0x415DF2: nft_rule_new.isra.2 (nft.c:945) ==11114== by 0x418ACE: nft_rule_append (nft.c:1000) ==11114== by 0x413A92: add_entry.isra.6 (xtables.c:424) ==11114== by 0x4152DE: do_commandx (xtables.c:1184) ==11114== by 0x4134E8: xtables_main (xtables-standalone.c:72) ==11114== by 0x5B87994: (below main) (libc-start.c:260) ==11114== Address 0x61399e8 is 8 bytes after a block of size 48 alloc'd ==11114== at 0x4C2B514: calloc (vg_replace_malloc.c:593) ==11114== by 0x52448C8: xtables_calloc (xtables.c:272) ==11114== by 0x410AC2: command_default (xshared.c:150) ==11114== by 0x4149A2: do_commandx (xtables.c:1075) ==11114== by 0x4134E8: xtables_main (xtables-standalone.c:72) ==11114== by 0x5B87994: (below main) (libc-start.c:260) m->u.match_size also contains the size of the xt_entry_match structure. Fix also the target path which is very similar. Reported-by: Ana Rey Botello <> Tested-by: Ana Rey Botello <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'iptables/xtables-standalone.c')
0 files changed, 0 insertions, 0 deletions