lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Aug 2017 20:56:24 -0600
From:   David Ahern <dsa@...ulusnetworks.com>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, fw@...len.de, idaifish@...il.com,
        syzkaller@...glegroups.com, dvyukov@...gle.com,
        eric.dumazet@...il.com
Subject: Re: [PATCH net] net: check and errout if res->fi is NULL when
 RTM_F_FIB_MATCH is set

On 8/15/17 8:50 PM, Roopa Prabhu wrote:
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 7effa62..49a018f 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -2763,14 +2763,21 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
>  	if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE)
>  		table_id = rt->rt_table_id;
>  
> -	if (rtm->rtm_flags & RTM_F_FIB_MATCH)
> +	if (rtm->rtm_flags & RTM_F_FIB_MATCH) {
> +		if (!res.fi) {
> +			err = fib_props[res->type].error;
> +			if (!err)
> +				err = -EINVAL;

I think -EHOSTUNREACH is a better error than EINVAL. Nothing about the
user inputs are invalid; rather the lookup is failing, but indirectly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ