Commit af6b896e authored by Florian Westphal's avatar Florian Westphal Committed by Yang Yingliang
Browse files

netfilter: x_tables: fix compat match/target pad out-of-bound write



stable inclusion
from linux-4.19.188
commit 12ec80252edefff00809d473a47e5f89c7485499

--------------------------------

commit b29c457a upstream.

xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: default avatar <syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com>
Reported-by: default avatarAndy Nguyen <theflow@google.com>
Fixes: 9fa492cd ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 07c9f97e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment