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]
Message-Id: <20120304.215505.1141896485416671142.davem@davemloft.net>
Date:	Sun, 04 Mar 2012 21:55:05 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	steffen.klassert@...unet.com
Cc:	timo.teras@....fi, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] route: Remove redirect_genid

From: Steffen Klassert <steffen.klassert@...unet.com>
Date: Thu, 1 Mar 2012 07:23:16 +0100

>  				peer = rt->peer;
> -				if (peer) {
> -					if (peer->redirect_learned.a4 != new_gw ||
> -					    peer->redirect_genid != redirect_genid) {
> -						peer->redirect_learned.a4 = new_gw;
> -						peer->redirect_genid = redirect_genid;
> -						atomic_inc(&__rt_peer_genid);
> -					}
> -					check_peer_redir(&rt->dst, peer);
> +				if (peer && peer->redirect_learned.a4 != new_gw) {
> +					peer->redirect_learned.a4 = new_gw;
> +					atomic_inc(&__rt_peer_genid);
>  				}
> +				check_peer_redir(&rt->dst, peer);
>  			}

If peer is NULL you cannot call check_peer_redir() because it assumes
that the passed in peer is non-NULL and dereferences it unconditionally.

Please keep the conditionals as they were, the check_peer_redir() call
was intentionally protected by the if (peer) check, and that way you
won't be introducing this bug.
--
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