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:	Sun, 17 Nov 2013 17:56:43 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Stefan Tomanek <stefan.tomanek@...tarbyte.de>,
	netdev@...r.kernel.org
CC:	Daniel Golle <daniel@...rotopia.org>
Subject: Re: [PATCH] fix NULL pointer Oops in fib(6)_rule_suppress

Hello.

On 17-11-2013 15:14, Stefan Tomanek wrote:

> Reported-by: Daniel Golle <daniel.golle@...il.com>
> Tested-by: Daniel Golle <daniel.golle@...il.com>
> Signed-off-by: Stefan Tomanek <stefan.tomanek@...tarbyte.de>
> ---
>   net/ipv4/fib_rules.c  |    4 +++-
>   net/ipv6/fib6_rules.c |    5 ++++-
>   2 files changed, 7 insertions(+), 2 deletions(-)

> diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
> index 523be38..4e1c1e5 100644
> --- a/net/ipv4/fib_rules.c
> +++ b/net/ipv4/fib_rules.c
> @@ -104,7 +104,9 @@ errout:
>   static bool fib4_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg)
>   {
>   	struct fib_result *result = (struct fib_result *) arg->result;
> -	struct net_device *dev = result->fi->fib_dev;
> +	struct net_device *dev = NULL;

    Please leave empty line after declarations, like it was before your patch.

> +	if (result->fi)
> +		dev = result->fi->fib_dev;
>
>   	/* do not accept result if the route does
>   	 * not meet the required prefix length
> diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
> index e275916..43e45b5 100644
> --- a/net/ipv6/fib6_rules.c
> +++ b/net/ipv6/fib6_rules.c
> @@ -122,7 +122,10 @@ out:
>   static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg)
>   {
>   	struct rt6_info *rt = (struct rt6_info *) arg->result;
> -	struct net_device *dev = rt->rt6i_idev->dev;
> +	struct net_device *dev = NULL;

    Same here.

> +	if (rt->rt6i_idev)
> +		dev = rt->rt6i_idev->dev;
> +

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ