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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 9 Oct 2018 14:09:26 +0200 (CEST)
From:   Marco Berizzi <pupilla@...ero.it>
To:     netdev@...r.kernel.org
Subject: icmp redirect sent when an active ipsec child_sa exist

Hi Folks,

I'm running strongSwan on Slackware with linux 4.18
This is the output from 'ip route show':

default via isp_router dev eth0 metric 1 
10.0.0.0/8 via 10.68.63.3 dev eth1 
10.68.63.0/26 dev eth1 proto kernel scope link src 10.68.63.62 
127.0.0.0/8 dev lo scope link 
172.16.0.0/12 via 10.68.63.3 dev eth1 
192.168.0.0/16 via 10.68.63.3 dev eth1 

and 'ip a s':

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 [trimmed]
    link/ether fc:4d:d4:2e:dc:6a brd ff:ff:ff:ff:ff:ff
    inet 10.68.63.62/26 brd 10.68.63.63 scope global eth1
       valid_lft forever preferred_lft forever

Connected to the eth1 there is also a 10.68.63.55 host:
the default gateway for this host is 10.68.63.62

This is the relevant configuration from stronSwan:

children {
         networks {
                  local_ts  = 10.68.63.54/31
                  remote_ts = 10.82.43.0/24
                  start_action = trap
                  }
         }

The value trap installs a trap policy, which is going
to trigger the tunnel as soon as matching traffic will
be detected.

When I issue a ping from 10.68.63.55 host to a 10.82.43.0/24
network's host, I get this behaviour:

12:24:40.219185 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 43, length 64
12:24:41.235072 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 44, length 64
12:24:42.251095 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 45, length 64
12:24:43.267007 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 46, length 64
12:24:44.282948 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 47, length 64
12:24:45.298873 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 48, length 64
12:24:46.314840 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 49, length 64
12:24:47.330767 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 50, length 64
12:24:48.346708 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 51, length 64
12:24:49.362627 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 52, length 64
12:24:49.362686 IP (tos 0xc0, ttl 64, id 11631, offset 0, flags [none], proto ICMP (1), length 112)
    10.68.63.62 > 10.68.63.55: ICMP redirect 10.82.43.10 to host 10.68.63.3, length 92
        IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 52, length 64
12:24:50.379051 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 53, length 64
12:24:50.379113 IP (tos 0xc0, ttl 64, id 12190, offset 0, flags [none], proto ICMP (1), length 112)
    10.68.63.62 > 10.68.63.55: ICMP redirect 10.82.43.10 to host 10.68.63.3, length 92
        IP (tos 0x0, ttl 62, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 53, length 64
12:24:51.398707 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    10.68.63.55 > 10.82.43.10: ICMP echo request, id 12199, seq 54, length 64

Linux is sending those icmp redirects *after* the
CHILD_SA has been established. When the CHILD_SA
is not yet established linux will not send any icmp
redirect.

Is this the expected behavior?

Obviously if I remove the following static route:

10.0.0.0/8 via 10.68.63.3 dev eth1 

linux will not send anymore the icmp redirect.

Any feedback are welcome.

Thanks in advance

Powered by blists - more mailing lists