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] [day] [month] [year] [list]
Message-ID: <20061218030243.GB7902@gondor.apana.org.au>
Date:	Mon, 18 Dec 2006 14:02:43 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Li Yewang <lyw@...jing-fnst.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH]Fix BUG of ip_rt_send_redirect()

On Wed, Nov 29, 2006 at 04:08:45PM +0800, Li Yewang wrote:
> 
> --- linux-2.6.19/net/ipv4/route.c.org 2006-12-05 10:47:02.402147160
> +0800
> +++ linux-2.6.19/net/ipv4/route.c 2006-12-05 10:48:26.339386760 +0800
> @@ -1327,7 +1327,8 @@ void ip_rt_send_redirect(struct sk_buff 
>   /* Check for load limit; set rate_last to the latest sent
>    * redirect.
>    */
> - if (time_after(jiffies,
> + if (rt->u.dst.rate_last == 0 ||
> +     time_after(jiffies,
>           (rt->u.dst.rate_last +
>     (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) {
>    icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, rt->rt_gateway);

Since rate_last can also be zero if jiffies == 0 (OK that's
extremely unlikely but I'm feeling picky today :), how about
checking rate_tokens instead? The value of rate_last can only
be relevant if rate_tokens is non-zero.

BTW, please also check the other spots where rate_last/rate_token
is used.  They might need a similar fix.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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