Florian Westphal
38e2294799
netfilter: nf_tables: fix use-after-free when deleting compat expressions
...
[ Upstream commit 29e3880109e357fdc607b4393f8308cef6af9413 ]
nft_compat ops do not have static storage duration, unlike all other
expressions.
When nf_tables_expr_destroy() returns, expr->ops might have been
free'd already, so we need to store next address before calling
expression destructor.
For same reason, we can't deref match pointer after nft_xt_put().
This can be easily reproduced by adding msleep() before
nft_match_destroy() returns.
Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables")
Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-17 09:28:48 +01:00
..
2018-11-27 16:10:48 +01:00
2018-09-15 09:45:28 +02:00
2017-09-08 18:55:52 +02:00
2017-07-31 19:01:40 +02:00
2017-11-02 11:10:55 +01:00
2017-04-26 09:30:22 +02:00
2017-06-19 19:13:21 +02:00
2017-07-24 13:24:46 +02:00
2018-11-21 09:24:09 +01:00
2017-04-26 09:30:22 +02:00
2017-09-04 13:25:19 +02:00
2017-09-04 13:25:19 +02:00
2017-04-19 17:55:17 +02:00
2017-06-19 19:13:21 +02:00
2018-08-24 13:08:57 +02:00
2017-04-19 17:55:17 +02:00
2017-08-24 18:52:32 +02:00
2017-04-26 09:30:22 +02:00
2017-04-19 17:55:16 +02:00
2018-09-15 09:45:28 +02:00
2017-07-24 13:24:46 +02:00
2018-08-24 13:09:22 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-08-24 18:52:33 +02:00
2017-04-19 17:55:17 +02:00
2017-04-26 09:30:22 +02:00
2017-07-24 13:24:46 +02:00
2017-09-04 13:25:19 +02:00
2017-04-19 17:55:17 +02:00
2017-04-26 09:30:22 +02:00
2017-04-26 09:30:22 +02:00
2017-05-29 11:32:36 +02:00
2017-11-02 11:10:55 +01:00
2016-12-04 20:45:33 +01:00
2016-12-04 20:45:33 +01:00
2018-08-24 13:09:07 +02:00
2017-04-06 22:01:38 +02:00
2017-09-18 17:33:23 +02:00
2017-04-06 22:01:38 +02:00
2017-04-06 22:01:38 +02:00
2018-03-15 10:54:23 +01:00
2016-12-04 20:45:30 +01:00
2017-07-01 09:08:41 -07:00
2017-01-03 14:33:25 +01:00
2017-09-04 13:25:19 +02:00
2017-08-28 17:44:00 +02:00
2017-11-02 11:10:55 +01:00
2017-05-17 16:06:01 -04:00
2018-12-17 09:28:48 +01:00
2018-07-08 15:30:50 +02:00
2016-09-12 19:54:45 +02:00
2017-04-06 18:32:04 +02:00
2017-07-31 20:41:57 +02:00
2018-09-15 09:45:28 +02:00
2018-01-31 14:03:41 +01:00
2017-08-24 18:52:33 +02:00
2017-08-02 14:25:59 +02:00
2018-07-17 11:39:32 +02:00
2017-07-17 13:27:46 +02:00
2017-05-15 12:51:41 +02:00
2016-11-09 23:42:23 +01:00
2017-05-15 12:51:41 +02:00
2018-12-17 09:28:48 +01:00
2017-09-04 13:25:09 +02:00
2018-06-16 09:45:14 +02:00
2017-05-03 10:11:26 -04:00
2017-08-28 17:42:56 +02:00
2016-11-03 11:52:34 +01:00
2017-07-31 19:01:40 +02:00
2017-03-13 13:45:36 +01:00
2016-12-06 21:48:22 +01:00
2017-05-01 10:47:53 -04:00
2018-07-08 15:30:49 +02:00
2018-07-08 15:30:51 +02:00
2017-01-24 21:46:29 +01:00
2017-03-06 18:23:23 +01:00
2017-03-06 18:22:12 +01:00
2018-07-08 15:30:49 +02:00
2017-03-23 16:41:27 -07:00
2017-04-07 18:24:47 +02:00
2017-09-04 13:25:09 +02:00
2017-08-28 17:42:56 +02:00
2017-04-07 18:24:47 +02:00
2017-09-04 13:25:09 +02:00
2017-05-15 12:51:41 +02:00
2017-03-06 18:22:12 +01:00
2017-03-06 18:22:12 +01:00
2017-03-06 18:22:12 +01:00
2017-08-28 18:14:30 +02:00
2017-05-29 12:46:18 +02:00
2018-09-05 09:26:27 +02:00
2017-07-31 20:41:59 +02:00
2018-04-26 11:02:21 +02:00
2017-07-24 13:24:46 +02:00
2017-05-02 10:16:04 -04:00
2018-02-25 11:08:01 +01:00
2018-02-25 11:07:50 +01:00
2018-10-10 08:54:23 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:51:33 +02:00
2017-08-19 13:07:53 +02:00
2017-04-15 11:51:33 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:47:57 +02:00
2017-08-24 18:52:33 +02:00
2016-11-03 10:56:21 +01:00
2016-11-03 10:56:21 +01:00
2018-04-08 14:26:29 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:51:33 +02:00
2018-11-27 16:10:48 +01:00
2016-10-17 17:38:19 +02:00
2017-04-15 11:51:33 +02:00
2018-04-26 11:02:13 +02:00
2018-04-26 11:02:13 +02:00
2016-11-03 10:56:21 +01:00
2016-12-06 21:48:20 +01:00
2017-09-04 13:25:19 +02:00
2017-09-04 13:25:19 +02:00
2018-04-26 11:02:13 +02:00
2016-11-03 10:56:21 +01:00
2016-11-03 10:56:21 +01:00
2018-01-31 14:03:41 +01:00
2017-03-02 08:42:31 +01:00
2017-01-18 20:32:43 +01:00
2016-11-03 10:56:21 +01:00
2017-01-09 17:24:55 +01:00
2017-01-09 17:24:55 +01:00
2018-02-25 11:07:50 +01:00
2018-04-08 14:26:29 +02:00
2016-12-04 21:16:51 +01:00
2017-11-02 11:10:55 +01:00
2017-07-01 09:08:41 -07:00
2016-11-10 13:28:42 +01:00
2017-09-26 20:04:34 +02:00
2017-04-15 11:47:57 +02:00
2018-04-26 11:02:13 +02:00
2017-01-09 17:24:55 +01:00
2017-07-24 13:24:46 +02:00
2017-01-09 17:24:55 +01:00
2016-12-25 17:21:22 +01:00
2017-09-03 17:08:42 -07:00