WSL2-Linux-Kernel/net/netlabel
Pavel Skripkin 8ca34a13f7 net: cipso: fix warnings in netlbl_cipsov4_add_std
Syzbot reported warning in netlbl_cipsov4_add(). The
problem was in too big doi_def->map.std->lvl.local_size
passed to kcalloc(). Since this value comes from userpace there is
no need to warn if value is not correct.

The same problem may occur with other kcalloc() calls in
this function, so, I've added __GFP_NOWARN flag to all
kcalloc() calls there.

Reported-and-tested-by: syzbot+cdd51ee2e6b0b2e18c0d@syzkaller.appspotmail.com
Fixes: 96cb8e3313 ("[NetLabel]: CIPSOv4 and Unlabeled packet integration")
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-27 20:58:30 +01:00
..
Kconfig
Makefile
netlabel_addrlist.c
netlabel_addrlist.h
netlabel_calipso.c
netlabel_calipso.h
netlabel_cipso_v4.c net: cipso: fix warnings in netlbl_cipsov4_add_std 2021-07-27 20:58:30 +01:00
netlabel_cipso_v4.h
netlabel_domainhash.c netlabel: Fix spelling mistakes 2021-06-07 14:08:30 -07:00
netlabel_domainhash.h
netlabel_kapi.c netlabel: Fix spelling mistakes 2021-06-07 14:08:30 -07:00
netlabel_mgmt.c netlabel: Fix memory leak in netlbl_mgmt_add_common 2021-06-15 11:19:04 -07:00
netlabel_mgmt.h
netlabel_unlabeled.c
netlabel_unlabeled.h
netlabel_user.c
netlabel_user.h