Cong Wang
99b79c3900
netfilter: xt_hashlimit: unregister proc file before releasing mutex
...
Before releasing the global mutex, we only unlink the hashtable
from the hash list, its proc file is still not unregistered at
this point. So syzbot could trigger a race condition where a
parallel htable_create() could register the same file immediately
after the mutex is released.
Move htable_remove_proc_entry() back to mutex protection to
fix this. And, fold htable_destroy() into htable_put() to make
the code slightly easier to understand.
Reported-and-tested-by: syzbot+d195fd3b9a364ddd6731@syzkaller.appspotmail.com
Fixes: c4a3922d2d20 ("netfilter: xt_hashlimit: reduce hashlimit_mutex scope for htable_put()")
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-02-26 23:25:07 +01:00
..
2020-02-22 12:13:45 +01:00
2020-01-24 08:12:06 +01:00
2019-10-17 12:20:48 +02:00
2019-09-26 08:56:17 +02:00
2020-01-27 08:54:30 +01:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-07-16 13:16:59 +02:00
2019-07-16 13:16:59 +02:00
2020-02-17 10:55:14 +01:00
2019-10-26 12:36:42 +02:00
2019-09-13 12:33:06 +02:00
2019-12-17 22:59:31 +01:00
2019-09-02 11:20:17 -07:00
2019-07-16 13:17:00 +02:00
2019-07-16 13:16:59 +02:00
2019-06-19 17:09:52 +02:00
2019-09-13 12:33:06 +02:00
2019-07-16 13:16:59 +02:00
2019-08-27 18:07:03 +02:00
2019-05-30 11:26:32 -07:00
2019-11-29 08:59:34 +01:00
2019-07-16 13:16:59 +02:00
2020-01-08 23:31:22 +01:00
2019-06-19 17:09:55 +02:00
2019-07-16 13:17:00 +02:00
2019-11-05 14:03:11 -08:00
2019-09-13 12:33:06 +02:00
2020-01-24 18:26:53 +01:00
2019-08-13 12:08:48 +02:00
2020-02-17 10:55:14 +01:00
2019-05-30 14:18:18 -07:00
2019-07-16 13:16:59 +02:00
2019-05-31 18:02:45 +02:00
2019-07-16 13:16:59 +02:00
2019-05-30 11:26:32 -07:00
2019-09-13 12:47:11 +02:00
2019-07-16 13:16:59 +02:00
2019-09-13 12:33:06 +02:00
2019-05-24 17:37:51 +02:00
2019-09-10 22:44:29 +02:00
2020-01-31 19:31:41 +01:00
2019-11-15 23:44:47 +01:00
2020-01-16 15:51:52 +01:00
2020-02-07 15:53:32 +01:00
2019-04-12 01:47:39 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-07-04 02:29:48 +02:00
2019-07-16 13:16:59 +02:00
2019-09-13 12:33:06 +02:00
2019-07-16 13:16:59 +02:00
2019-06-22 08:59:24 -04:00
2019-07-16 13:16:59 +02:00
2019-04-11 20:59:34 +02:00
2020-01-16 15:08:25 +01:00
2019-06-22 08:59:24 -04:00
2019-07-16 13:16:59 +02:00
2019-07-16 13:16:59 +02:00
2019-12-07 19:53:00 +01:00
2017-11-02 11:10:55 +01:00
2019-08-03 18:39:08 +02:00
2020-01-27 08:54:30 +01:00
2019-07-05 21:34:47 +02:00
2020-01-24 20:54:11 +01:00
2020-01-27 08:54:30 +01:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:37:51 +02:00
2019-12-09 10:36:44 -08:00
2019-05-24 17:37:51 +02:00
2019-08-26 11:06:07 +02:00
2019-06-02 18:06:26 -07:00
2020-01-14 11:48:41 -08:00
2020-01-24 20:54:29 +01:00
2020-01-16 15:52:02 +01:00
2019-08-26 11:01:00 +02:00
2019-10-23 13:01:34 +02:00
2019-07-18 20:19:02 +02:00
2019-04-08 23:01:42 +02:00
2019-12-09 13:14:03 +01:00
2019-06-19 17:09:55 +02:00
2019-10-01 18:42:15 +02:00
2019-06-19 17:09:55 +02:00
2019-12-09 10:36:44 -08:00
2019-09-10 22:44:29 +02:00
2020-01-27 08:54:30 +01:00
2019-06-25 01:32:59 +02:00
2019-06-19 17:09:55 +02:00
2019-09-03 22:53:56 +02:00
2019-06-19 17:09:55 +02:00
2020-01-05 10:06:22 +01:00
2019-09-10 22:44:29 +02:00
2019-07-16 13:17:03 +02:00
2019-08-13 12:10:01 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-09-20 10:20:02 +02:00
2019-12-09 10:36:44 -08:00
2019-12-26 17:41:34 +01:00
2019-12-09 10:36:44 -08:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:15 +02:00
2020-01-18 21:18:41 +01:00
2019-11-20 11:21:34 -08:00
2019-06-19 17:09:55 +02:00
2019-09-03 19:05:00 +02:00
2019-12-09 13:14:03 +01:00
2019-12-09 10:36:44 -08:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-01-16 15:51:55 +01:00
2020-01-16 15:51:55 +01:00
2020-02-26 14:33:09 +01:00
2020-01-27 08:54:30 +01:00
2019-09-02 23:20:59 +02:00
2019-09-10 22:35:37 +02:00
2019-12-26 13:11:40 -08:00
2020-01-19 22:10:04 +01:00
2019-06-19 17:09:55 +02:00
2019-06-28 19:30:50 +02:00
2020-01-31 19:30:54 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2018-02-14 21:05:38 +01:00
2019-06-19 17:09:55 +02:00
2019-09-13 12:33:06 +02:00
2019-05-21 11:28:45 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-02-26 23:25:07 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-11-05 14:03:11 -08:00
2019-08-13 12:08:48 +02:00
2019-05-30 11:26:32 -07:00
2019-06-25 01:32:59 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:38 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-08-19 09:34:21 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 11:28:45 +02:00
2019-06-25 01:32:59 +02:00
2019-09-13 12:32:48 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-12-09 10:36:44 -08:00
2019-06-19 17:09:55 +02:00
2020-02-04 03:05:26 +00:00
2019-06-19 17:09:55 +02:00
2017-11-02 11:10:55 +01:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-08-13 12:14:26 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-22 08:59:24 -04:00
2019-05-21 10:50:45 +02:00
2019-05-21 11:28:40 +02:00
2019-11-15 23:44:45 +01:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00