]> 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)
commit4c76c8f7b115469154fd86d9ad42e233fa95c2ec
tree2c6e4b48a50f0cbed8cc9600fa40c4146e9b52c3
parent84366058f512c8549ca3bfe05f367432885670d8
netlink: fix policy dump leak

[ Upstream commit dfa312730691bdcc402eb91c74137405b5765d8a ]

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