]> 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:07:42 +0000 (13:07 -0700)
commitdc9e55dd2651491f706f065b0aec3822c4b7d9cc
tree2c6e4b48a50f0cbed8cc9600fa40c4146e9b52c3
parentefec503a44bbd3c0c7e308f9a9de6a1a78cd4995
netlink: fix policy dump leak

[ Upstream commit ddb160a2b11b98ae18f239fe61ce35f909240337 ]

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

Fixes: 4ab6fb076fb7 ("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