diff options
| author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2015-01-23 12:01:26 +0100 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-02-04 13:32:40 +0000 |
| commit | 569a4ccdd320abaf7cb7d9a70757dc84b42420d9 (patch) | |
| tree | 9ccb85bb6b4118eb9ff00750801fec684c32e7ad /include/uapi | |
| parent | 5e852e1ee6af6c33b35dfe5e389ac4b15852ea1d (diff) | |
ipv4: try to cache dst_entries which would cause a redirect
commit df4d92549f23e1c037e83323aff58a21b3de7fe0 upstream.
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated with DST_NOCACHE set which
will force dst_release to free them via RCU. Unfortunately waiting for
RCU grace period just takes too long, we can end up with >1M dst_entries
waiting to be released and the system will run OOM. rcuos threads cannot
catch up under high softirq load.
Attaching the flag to emit a redirect later on to the specific skb allows
us to cache those dst_entries thus reducing the pressure on allocation
and deallocation.
This issue was discovered by Marcelo Leitner.
Cc: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Marcelo Leitner <mleitner@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions
