OSDN Git Service

netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 24 Mar 2016 20:29:53 +0000 (21:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 07:44:29 +0000 (08:44 +0100)
commit9a07167f70a717a5171944195553c8fed7294d6b
treec5e710e596aefeecbf521a49308f1e83372d819d
parentda517f513b86c7eb133da71d9d8a01edfc5a18bb
netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES

commit b301f2538759933cf9ff1f7c4f968da72e3f0757 upstream.

Make sure the table names via getsockopt GET_ENTRIES is nul-terminated
in ebtables and all the x_tables variants and their respective compat
code. Uncovered by KASAN.

Reported-by: Baozeng Ding <sploving1@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/netfilter/ebtables.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c