Re: [PATCH RESEND] tcp: incoming connections might use wrong routeunder synflood

From: David Miller
Date: Thu Apr 11 2013 - 16:02:41 EST

From: Dmitry Popov <dp@xxxxxxxxxxxxxxx>
Date: Thu, 11 Apr 2013 22:55:07 +0400

> There is a bug in cookie_v4_check (net/ipv4/syncookies.c):
> flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk),
> inet_sk_flowi_flags(sk),
> (opt && opt->srr) ? opt->faddr : ireq->rmt_addr,
> ireq->loc_addr, th->source, th->dest);
> Here we do not respect sk->sk_bound_dev_if, therefore wrong dst_entry may be
> taken. This dst_entry is used by new socket (get_cookie_sock ->
> tcp_v4_syn_recv_sock), so its packets may take the wrong path.
> Signed-off-by: Dmitry Popov <dp@xxxxxxxxxxxxxxx>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at