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:	Wed, 15 Feb 2012 16:44:03 +0400
From:	Michael Tokarev <mjt@....msk.ru>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: 3.0: unexpected route cache entry for wrong segment?

On 15.02.2012 16:10, Michael Tokarev wrote:
> On 09.02.2012 22:37, Michael Tokarev wrote:
>> On 09.02.2012 21:45, Eric Dumazet wrote:
> []
>>> Did you try to apply by hand commits :
>>>
>>> 7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae // added in 3.2
>>> (route: fix ICMP redirect validation)
>>>
>>> and
>>> 9cc20b268a5a14f5e57b8ad405a83513ab0d78dc
>>> (ipv4: fix redirect handling)
[]
>>> David is currently working on backporting to 3.0 all necessary fixes for
>>> this exact problem.
>
> David, any progress with these?
>
> 7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae "route: fix ICMP redirect validation"
> applies correctly to 3.0, but 9cc20b268a5a14f5e57b8ad405a83513ab0d78dc
> "ipv4: fix redirect handling" does not, due to some changes in-between,
> but these should be easy to sort out. Should I perhaps refresh this
> patch myself? It should be doable, I think.

A quick followup.

9cc20b268a5a14f5e57b8ad405a83513ab0d78dc does not apply to current 3.0-stable
(3.0.21) because in last release, a backport of d3aaeb38c40e5a6c08dd31a1b64da65c4352be36
"net: fix NULL dereferences in check_peer_redir()" has been applied, which
changed check_peer_redir() routine a bit and it become different than in
subsequent 3.2+ releases.  And 9cc20b268a5a... moves this routine up in
net/ipv4/route.c file.

Here's the difference between check_peer_redir() in 3.0.21 and 3.2+:

          dst_confirm(&rt->dst);

          rt->rt_gateway = peer->redirect_learned.a4;
-        n = __arp_bind_neighbour(&rt->dst, rt->rt_gateway);
+
+        n = ipv4_neigh_lookup(&rt->dst, &rt->rt_gateway);
          if (IS_ERR(n))
                  return PTR_ERR(n);
          old_n = xchg(&rt->dst._neighbour, n);


With this change in mind, attached is a "backport" of 9cc20b268a5a...
to 3.0.21, which applies on top of 7cc9150ebe8ec0... "route: fix
ICMP redirect validation".

I'm building new kernel with the two patches applied

Thanks!

/mjt

View attachment "ipv4-fix-redirect-handling.diff" of type "text/x-diff" (4757 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ