]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_RATEEST: reject non-null terminated string from userspace
authorFlorian Westphal <fw@strlen.de>
Tue, 22 Dec 2020 22:23:56 +0000 (23:23 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 27 Dec 2020 10:52:26 +0000 (11:52 +0100)
commit759bf216d460df3d535a4cdf2b439d44e24058f1
tree5399252573123cb025b36d7065f38ae8b5d1058a
parentad7054e63bc769d4c1ee70b3b2a55973be5714e6
netfilter: xt_RATEEST: reject non-null terminated string from userspace

syzbot reports:
detected buffer overflow in strlen
[..]
Call Trace:
 strlen include/linux/string.h:325 [inline]
 strlcpy include/linux/string.h:348 [inline]
 xt_rateest_tg_checkentry+0x2a5/0x6b0 net/netfilter/xt_RATEEST.c:143

strlcpy assumes src is a c-string. Check info->name before its used.

Reported-by: syzbot+e86f7c428c8c50db65b4@syzkaller.appspotmail.com
Fixes: 45c061bbd95c4d9 ("[NETFILTER]: x_tables: add RATEEST target")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_RATEEST.c