]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_CT: Reject the non-null terminated string from user space
authorGao Feng <gfree.wind@vip.163.com>
Wed, 30 May 2018 02:29:31 +0000 (10:29 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 08:14:51 +0000 (10:14 +0200)
commit472efdc755179b41c2731ac3d16db474eeb0ddb1
treea8d0496a35d5eb92d8517017b8ccea917128fc8a
parent2612d9ab13e7568a551816af52a6224c55fee812
netfilter: xt_CT: Reject the non-null terminated string from user space

The helper and timeout strings are from user-space, we need to make
sure they are null terminated. If not, evil user could make kernel
read the unexpected memory, even print it when fail to find by the
following codes.

pr_info_ratelimited("No such helper \"%s\"\n", helper_name);

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_CT.c