]> git.baikalelectronics.ru Git - kernel.git/commit
udp: fix secpath leak
authorYossi Kuperman <yossiku@mellanox.com>
Fri, 1 Sep 2017 12:42:30 +0000 (14:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Sep 2017 17:29:34 +0000 (10:29 -0700)
commit1ddb2050b43948b9e5896a6a8cf1784e89dc2261
treee2b91d7b5e1c46edac87d37c7ecd2b218585c5cd
parentf277e97470dd3dcf6234f2e1106ed467b571cb72
udp: fix secpath leak

After commit 106e23b12bf6 ("udp: preserve head state for IP_CMSG_PASSSEC")
we preserve the secpath for the whole skb lifecycle, but we also
end up leaking a reference to it.

We must clear the head state on skb reception, if secpath is
present.

Fixes: 106e23b12bf6 ("udp: preserve head state for IP_CMSG_PASSSEC")
Signed-off-by: Yossi Kuperman <yossiku@mellanox.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c