From: David Miller <davem@davemloft.net>
To: dp@highloadlab.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] tcp: incoming connections might use wrong route under synflood
Date: Thu, 11 Apr 2013 16:02:31 -0400 (EDT) [thread overview]
Message-ID: <20130411.160231.1367130064866607872.davem@davemloft.net> (raw)
In-Reply-To: <20130411225507.427b369046e53d03222b8fd3@highloadlab.com>
From: Dmitry Popov <dp@highloadlab.com>
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),
> RT_SCOPE_UNIVERSE, IPPROTO_TCP,
> 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@highloadlab.com>
Applied.
prev parent reply other threads:[~2013-04-11 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 18:55 [PATCH RESEND] tcp: incoming connections might use wrong route under synflood Dmitry Popov
2013-04-11 20:02 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130411.160231.1367130064866607872.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dp@highloadlab.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).