Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipvs: initialize tbl->entries after allocation

tbl->entries is not initialized after kmalloc(), therefore
causes an uninit-value warning in ip_vs_lblc_check_expire()
as reported by syzbot.

Reported-by: <syzbot+3dfdea57819073a04f21@syzkaller.appspotmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Cong Wang and committed by
Pablo Neira Ayuso
3aa1409a 146cd6b5

+1
+1
net/netfilter/ipvs/ip_vs_lblcr.c
··· 535 535 tbl->counter = 1; 536 536 tbl->dead = false; 537 537 tbl->svc = svc; 538 + atomic_set(&tbl->entries, 0); 538 539 539 540 /* 540 541 * Hook periodic timer for garbage collection