]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: x_tables: fix compat match/target pad out-of-bound write
authorFlorian Westphal <fw@strlen.de>
Wed, 7 Apr 2021 19:38:57 +0000 (21:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Apr 2021 22:18:57 +0000 (00:18 +0200)
commita38a21e61aba58ce1ed42d49cf112f03dc751ade
treea2cabc721228fc1d876374aac3bd7758d4016165
parentf73ddeda6e6d3a2c0e3e920c943f07533c540b7a
netfilter: x_tables: fix compat match/target pad out-of-bound write

xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com
Reported-by: Andy Nguyen <theflow@google.com>
Fixes: 23ad4d8c5483f ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c