WSL2-Linux-Kernel/net/netlink
Jakub Kicinski 249801360d net: genl: fix error path memory leak in policy dumping
If construction of the array of policies fails when recording
non-first policy we need to unwind.

netlink_policy_dump_add_policy() itself also needs fixing as
it currently gives up on error without recording the allocated
pointer in the pstate pointer.

Reported-by: syzbot+dc54d9ba8153b216cae0@syzkaller.appspotmail.com
Fixes: 50a896cf2d ("genetlink: properly support per-op policy dumping")
Link: https://lore.kernel.org/r/20220816161939.577583-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-08-18 10:20:48 -07:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
af_netlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-12 16:15:30 -07:00
af_netlink.h
diag.c
genetlink.c net: genl: fix error path memory leak in policy dumping 2022-08-18 10:20:48 -07:00
policy.c net: genl: fix error path memory leak in policy dumping 2022-08-18 10:20:48 -07:00