]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: fix policy dump leak
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 Oct 2020 07:46:04 +0000 (09:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 20:00:38 +0000 (13:00 -0700)
commitdfa312730691bdcc402eb91c74137405b5765d8a
treeb07e2f039e791ab243a7f65f7c4758b339ee80b2
parentf52646fd2c616b53df8700e588a0ac7dda743b3f
netlink: fix policy dump leak

If userspace doesn't complete the policy dump, we leak the
allocated state. Fix this.

Fixes: 6ec88086e2e4 ("netlink: add infrastructure to expose policies to userspace")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netlink.h
net/netlink/genetlink.c
net/netlink/policy.c