diff options
author | Patrick McHardy <kaber@trash.net> | 2005-08-14 19:27:13 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 16:00:45 -0700 |
commit | 77247bbb3094246be9d057e7be442cc708f123a8 (patch) | |
tree | f6129e1aa25be790fdf38d5f39e1d38b2fa19587 /include/linux/capability.h | |
parent | db080529798b497eb5a37b92a25e966be5a7dd5d (diff) | |
download | blackbird-op-linux-77247bbb3094246be9d057e7be442cc708f123a8.tar.gz blackbird-op-linux-77247bbb3094246be9d057e7be442cc708f123a8.zip |
[NETLINK]: Fix module refcounting problems
Use-after-free: the struct proto_ops containing the module pointer
is freed when a socket with pid=0 is released, which besides for kernel
sockets is true for all unbound sockets.
Module refcount leak: when the kernel socket is closed before all user
sockets have been closed the proto_ops struct for this family is
replaced by the generic one and the module refcount can't be dropped.
The second problem can't be solved cleanly using module refcounting in the
generic socket code, so this patch adds explicit refcounting to
netlink_create/netlink_release.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/capability.h')
0 files changed, 0 insertions, 0 deletions