OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:44:59 +0000 (19:44 +0200)
commitc7a9d69b727acbe1e5e5d16bd25c06003d57706e
treeaa4a1861ff8823ff82abd9f8c91f8989d58c550f
parent82ae1a89b1345c2edad72525853ddc22de030f9a
ipv6: invert flowlabel sharing check in process and user mode

[ Upstream commit 95c169251bf734aa555a1e8043e4d88ec97a04ec ]

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6_flowlabel.c