OSDN Git Service

netfilter: nf_tables: remove WARN and add NLA_STRING upper limits
authorFlorian Westphal <fw@strlen.de>
Thu, 16 Jan 2020 08:06:50 +0000 (09:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:21:34 +0000 (08:21 +0100)
commit1632efb3553b7e79ffc666ff5291705b4b87eb6c
treebcdd68f400ec2163b79930dde0bf3b1360077fb7
parent6de941ce70cd5c6d672f8af2d0a6dc83039a283c
netfilter: nf_tables: remove WARN and add NLA_STRING upper limits

commit 9332d27d7918182add34e8043f6a754530fdd022 upstream.

This WARN can trigger because some of the names fed to the module
autoload function can be of arbitrary length.

Remove the WARN and add limits for all NLA_STRING attributes.

Reported-by: syzbot+0e63ae76d117ae1c3a01@syzkaller.appspotmail.com
Fixes: 452238e8d5ffd8 ("netfilter: nf_tables: add and use helper for module autoload")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nf_tables_api.c