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:22:48 +0000 (08:22 +0100)
commitba8d5b1938c2204d555f84cfbe690e48bf88b530
tree1bfb49423e82ca48d654dc0b294ad25b69df82de
parent9da572424be1b7e3dac69cf27712ee9dc3bac339
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