diff options
author | Julian Anastasov <ja@ssi.bg> | 2017-02-26 15:50:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-26 11:03:38 -0500 |
commit | 8bcfd0925ef15f072ba1e7bee2c25e9e1b5fd6ca (patch) | |
tree | f3390a0540238f4d5168ae4883deb73026182848 /net/ipv4/route.c | |
parent | 8118b7b76c8c087055054884a39db6a7d138e1c5 (diff) | |
download | linux-rpi-8bcfd0925ef15f072ba1e7bee2c25e9e1b5fd6ca.tar.gz linux-rpi-8bcfd0925ef15f072ba1e7bee2c25e9e1b5fd6ca.tar.bz2 linux-rpi-8bcfd0925ef15f072ba1e7bee2c25e9e1b5fd6ca.zip |
ipv4: add missing initialization for flowi4_uid
Avoid matching of random stack value for uid when rules
are looked up on input route or when RP filter is used.
Problem should affect only setups that use ip rules with
uid range.
Fixes: 622ec2c9d524 ("net: core: add UID to flows, rules, and routes")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index cb494a5050f7..584ed667bfa4 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1876,6 +1876,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, fl4.flowi4_flags = 0; fl4.daddr = daddr; fl4.saddr = saddr; + fl4.flowi4_uid = sock_net_uid(net, NULL); err = fib_lookup(net, &fl4, &res, 0); if (err != 0) { if (!IN_DEV_FORWARD(in_dev)) |