]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: x_tables: add and use xt_check_proc_name
authorFlorian Westphal <fw@strlen.de>
Sat, 10 Mar 2018 00:15:45 +0000 (01:15 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 11 Mar 2018 20:24:29 +0000 (21:24 +0100)
commit07970704355650588b1206f863620f29c60f0af5
tree70d90ea7b61812f4472ac77f78eb697aac3f1e2b
parent69bf92a5a3e5cfadda9b19471f8224a4f07a5f64
netfilter: x_tables: add and use xt_check_proc_name

recent and hashlimit both create /proc files, but only check that
name is 0 terminated.

This can trigger WARN() from procfs when name is "" or "/".
Add helper for this and then use it for both.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: <syzbot+0502b00edac2a0680b61@syzkaller.appspotmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/x_tables.h
net/netfilter/x_tables.c
net/netfilter/xt_hashlimit.c
net/netfilter/xt_recent.c