]> www.infradead.org Git - users/dwmw2/linux.git/commit
ipv6: invert flowlabel sharing check in process and user mode
authorWillem de Bruijn <willemb@google.com>
Thu, 25 Apr 2019 16:06:54 +0000 (12:06 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Aug 2019 11:39:18 +0000 (12:39 +0100)
commit9fd1512321314137f0e7c1366a1041ac6774fb8e
treeaa3cfed9079280b89fd6c6fbb171fe2b3834f34e
parent5a95f35b57aed9e4c550c0b17d6c61afd089ad48
ipv6: invert flowlabel sharing check in process and user mode

commit 95c169251bf734aa555a1e8043e4d88ec97a04ec upstream.

A request for a flowlabel fails in process or user exclusive mode must
fail if the caller pid or uid does not match. Invert the test.

Previously, the test was unsafe wrt PID recycling, but indeed tested
for inequality: fl1->owner != fl->owner

Fixes: 4f82f45730c68 ("net ip6 flowlabel: Make owner a union of struct pid* and kuid_t")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv6/ip6_flowlabel.c