]> git.proxmox.com Git - mirror_ubuntu-disco-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 30 Jul 2019 10:58:17 +0000 (12:58 +0200)
commit6226a5fa012e976663c1dae8051367978b691f88
tree2dce79460fbcd706debf498eab3b2d9c1fd1e6d0
parent241bbb19f85d748cce457cae1ebe6c912552b5f1
netfilter: ctnetlink: don't use conntrack/expect object addresses as id

BugLink: https://bugs.launchpad.net/bugs/1836577
[ Upstream commit 3c79107631db1f7fd32cf3f7368e4672004a3010 ]

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: 3583240249ef ("[NETFILTER]: nf_conntrack_expect: kill unique ID")
Fixes: 7f85f914721f ("[NETFILTER]: nf_conntrack: kill unique ID")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/net/netfilter/nf_conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c