]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ctnetlink: don't use conntrack/expect object addresses as id
authorFlorian Westphal <fw@strlen.de>
Mon, 1 Apr 2019 11:08:54 +0000 (13:08 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 15 Apr 2019 05:31:44 +0000 (07:31 +0200)
commit19158fa649c3a03119f2abd9d9dd4201362982b1
treee8eb82a458ef088d823e96d66d6ee2ff40e70774
parenta13edd5dadf2fa5b46d51257fe4dbfa23e2e2d8b
netfilter: ctnetlink: don't use conntrack/expect object addresses as id

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: 49db193496bb ("[NETFILTER]: nf_conntrack_expect: kill unique ID")
Fixes: 1195e1ef2813 ("[NETFILTER]: nf_conntrack: kill unique ID")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c