Skip to content
Commit 3d8b3d03 authored by Florian Westphal's avatar Florian Westphal Committed by Ben Hutchings
Browse files

netfilter: ctnetlink: don't use conntrack/expect object addresses as id

commit 3c791076 upstream.

else, we leak the addresses to userspace via ctnetlink events
and dumps.

Compute an ID on demand based on the immutable parts of nf_conn struct.

Another advantage compared to using an address is that there is no
immediate re-use of the same ID in case the conntrack entry is freed and
reallocated again immediately.

Fixes: 35832402 ("[NETFILTER]: nf_conntrack_expect: kill unique ID")
Fixes: 7f85f914

 ("[NETFILTER]: nf_conntrack: kill unique ID")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
[bwh: Backported to 3.16:
 - Include <net/netns/hash.h> in nf_conntrack_core.c
 - Adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 9ebeec41
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment