Hannes Frederic Sowa
df4d92549f
ipv4: try to cache dst_entries which would cause a redirect
...
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>
2015-01-26 17:28:27 -08:00
..
2014-11-06 14:59:19 -05:00
2014-12-10 13:17:23 -05:00
2013-09-23 16:29:41 -04:00
2014-12-10 15:33:16 -05:00
2014-12-11 14:27:06 -08:00
2014-11-13 11:25:03 +01:00
2014-12-02 22:48:13 +01:00
2014-11-24 05:16:40 -05:00
2014-11-24 16:12:03 -05:00
2014-10-27 15:51:16 +01:00
2014-02-12 19:23:32 -05:00
2014-09-23 12:09:27 -04:00
2014-10-25 08:07:30 +02:00
2013-07-31 17:50:01 -07:00
2013-08-10 01:16:44 -07:00
2014-11-24 05:16:42 -05:00
2014-09-18 10:54:36 +02:00
2013-12-28 17:02:46 -05:00
2013-07-31 17:50:02 -07:00
2014-11-10 13:27:49 -05:00
2014-11-10 13:27:49 -05:00
2014-11-10 13:27:49 -05:00
2014-11-10 13:27:49 -05:00
2014-01-13 17:39:11 +01:00
2014-11-26 20:56:42 +01:00
2014-11-17 09:49:17 +01:00
2014-11-26 12:25:43 -05:00
2013-12-10 17:56:54 -05:00
2014-02-08 10:36:58 -05:00
2014-08-22 19:57:23 -07:00
2014-11-19 16:23:49 -05:00
2014-02-09 17:32:50 -08:00
2013-12-06 12:37:56 -05:00
2014-07-17 16:02:29 -07:00
2013-12-10 21:50:00 -05:00
2013-09-20 14:49:32 -04:00
2013-09-20 14:49:32 -04:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2014-10-30 14:54:11 -04:00
2014-09-08 09:51:29 +09:00
2014-09-16 10:08:49 +02:00
2013-11-07 19:28:58 -05:00
2014-02-04 20:19:51 -08:00
2013-09-20 14:49:33 -04:00
2014-09-05 17:47:02 -07:00
2014-04-16 15:05:11 -04:00
2014-02-12 07:02:11 +01:00
2014-11-12 15:01:35 -05:00
2013-09-20 14:49:33 -04:00
2014-09-30 01:02:26 -04:00
2015-01-16 17:04:25 -05:00
2014-10-07 00:10:49 -04:00
2014-06-04 22:46:38 -07:00
2014-11-05 16:30:03 -05:00
2013-09-20 14:49:33 -04:00
2014-02-06 09:34:58 +01:00
2014-11-05 21:53:04 +01:00
2014-10-14 13:15:15 -04:00
2014-04-15 12:58:34 -04:00
2014-11-05 16:59:04 -05:00
2014-11-26 15:45:04 -05:00
2014-09-22 16:27:10 -04:00
2014-05-07 15:30:52 -04:00
2014-09-08 09:51:29 +09:00
2014-05-14 16:07:23 -04:00
2014-06-27 15:53:35 -07:00
2014-07-01 23:46:21 -07:00
2014-09-08 16:42:42 -07:00
2014-08-24 18:09:23 -07:00
2014-10-07 00:02:30 -04:00
2014-05-24 00:32:30 -04:00
2014-11-06 14:19:19 -05:00
2014-12-08 21:14:32 -05:00
2014-11-12 15:01:35 -05:00
2014-10-02 18:30:58 +02:00
2015-01-26 17:28:27 -08:00
2014-10-30 20:01:18 -04:00
2014-11-24 04:28:49 -05:00
2013-09-21 14:01:39 -04:00
2013-09-21 14:01:38 -04:00
2014-10-14 02:18:27 +02:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-01-01 22:22:43 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2013-09-21 14:01:38 -04:00
2014-01-03 20:56:48 -05:00
2015-01-05 10:33:46 +01:00
2014-11-13 04:51:58 +01:00
2013-12-06 12:37:56 -05:00
2014-09-22 16:23:15 -04:00
2014-11-05 23:52:33 -08:00
2013-10-01 17:06:14 -04:00
2013-09-21 14:01:39 -04:00
2014-12-26 17:07:08 -05:00
2014-12-04 14:31:00 -05:00
2013-09-21 14:01:39 -04:00
2014-08-07 20:55:21 -04:00
2014-10-28 17:07:29 -04:00
2014-02-08 10:36:58 -05:00
2013-09-21 14:01:39 -04:00
2014-11-09 19:50:28 +01:00
2013-09-21 14:01:39 -04:00
2014-11-18 15:28:28 -05:00
2014-10-06 18:02:32 -04:00
2014-10-06 00:55:10 -04:00
2014-05-23 16:28:53 -04:00
2013-09-23 01:51:08 -04:00
2013-09-23 01:51:08 -04:00
2013-09-23 01:51:08 -04:00
2014-01-21 23:17:20 -08:00
2014-11-28 14:33:41 +01:00
2013-10-10 00:08:07 -04:00
2013-09-23 01:51:08 -04:00
2014-03-24 12:45:01 -04:00
2014-07-15 16:13:07 -07:00
2014-12-09 14:49:02 -05:00
2013-09-23 01:51:09 -04:00
2014-06-02 11:00:41 -07:00
2014-10-15 07:48:18 +02:00
2014-12-13 13:33:26 -08:00
2013-12-19 18:51:20 -05:00
2013-09-23 01:51:09 -04:00
2014-12-02 20:01:22 -08:00
2013-10-21 18:43:02 -04:00
2014-11-04 16:06:09 -05:00
2014-01-19 19:53:18 -08:00
2014-05-22 14:57:15 -04:00
2014-11-10 15:09:45 -05:00
2014-10-01 21:35:51 -04:00
2014-12-09 16:29:03 -05:00
2013-07-27 22:14:06 -07:00
2014-12-26 17:20:56 -05:00
2013-09-23 16:29:40 -04:00
2014-09-05 17:35:28 -07:00
2013-09-23 16:29:41 -04:00
2014-09-02 13:37:56 +02:00