Florian Westphal
47b2ea9940
netfilter: nf_tables: must hold rcu read lock while iterating object type list
...
[ Upstream commit cddc04275f ]
Update of stateful object triggers:
WARNING: suspicious RCU usage
net/netfilter/nf_tables_api.c:7759 RCU-list traversed in non-reader section!!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
1 lock held by nft/3060:
#0 : ffff88810f0578c8 (&nft_net->commit_mutex){+.+.}-{4:4}, [..]
... but this list is not protected by the transaction mutex but the
nfnl nftables subsystem mutex.
Switch to nft_obj_type_get which will acquire rcu read lock,
bump refcount, and returns the result.
v3: Dan Carpenter points out nft_obj_type_get returns error pointer, not
NULL, on error.
Fixes: dad3bdeef4 ("netfilter: nf_tables: fix memory leak during stateful obj update").
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 >
2024-12-05 14:01:53 +01:00
..
2024-06-19 15:12:56 +02:00
2024-10-02 17:23:23 -04:00
2024-09-06 18:10:21 -07:00
2024-01-29 15:43:21 +01:00
2024-07-01 17:03:01 +02:00
2024-10-24 16:43:50 -07:00
2024-08-19 18:44:51 +02:00
2024-05-22 15:00:56 -07:00
2024-09-26 13:03:03 +02:00
2024-02-21 11:57:11 +01:00
2024-03-07 03:10:35 +01:00
2024-09-26 13:03:02 +02:00
2024-05-06 11:13:56 +02:00
2024-05-06 11:13:56 +02:00
2024-01-31 23:13:57 +01:00
2024-10-02 17:23:23 -04:00
2024-07-24 20:59:29 +02:00
2024-07-01 17:03:01 +02:00
2024-09-12 15:41:03 +02:00
2024-09-12 15:41:03 +02:00
2024-08-22 12:14:18 +02:00
2024-08-14 23:37:16 +02:00
2024-07-01 17:01:53 +02:00
2024-07-24 20:59:29 +02:00
2024-06-19 18:41:59 +02:00
2024-01-17 12:02:48 +01:00
2024-07-24 20:59:29 +02:00
2024-01-31 20:40:56 -08:00
2024-09-26 13:03:03 +02:00
2024-02-21 12:03:22 +01:00
2024-10-02 17:23:23 -04:00
2024-12-05 14:01:53 +01:00
2024-08-20 12:37:25 +02:00
2024-06-25 20:40:47 +02:00
2024-06-12 14:33:38 -07:00
2024-06-26 00:54:53 +02:00
2024-01-17 12:02:47 +01:00
2024-08-19 18:44:50 +02:00
2024-08-19 18:44:50 +02:00
2024-08-20 12:37:24 +02:00
2024-10-02 17:23:23 -04:00
2024-05-06 11:13:55 +02:00
2024-08-20 12:37:24 +02:00
2024-09-26 13:03:02 +02:00
2024-05-10 11:13:45 +02:00
2024-09-03 10:47:16 +02:00
2024-08-20 12:37:24 +02:00
2024-08-20 12:37:24 +02:00
2024-09-03 18:19:44 +02:00
2024-10-02 17:23:23 -04:00
2024-09-03 10:47:17 +02:00
2024-09-09 14:14:53 +01:00
2024-09-03 10:47:17 +02:00
2024-08-20 12:37:24 +02:00
2024-09-03 10:47:17 +02:00
2024-05-10 11:13:45 +02:00
2024-05-10 11:13:45 +02:00
2024-09-26 13:03:02 +02:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-09-26 13:03:02 +02:00
2024-09-03 10:47:17 +02:00
2024-09-26 13:03:02 +02:00
2024-08-20 12:37:24 +02:00
2024-09-03 10:47:17 +02:00
2024-10-31 10:54:49 +01:00
2024-09-03 10:47:17 +02:00
2024-05-10 11:13:45 +02:00
2024-08-20 12:37:24 +02:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-04-17 17:43:11 +02:00
2024-04-17 17:43:11 +02:00
2024-07-24 10:01:59 +02:00
2024-09-26 13:03:02 +02:00
2024-07-17 19:00:47 +02:00
2024-04-17 17:43:11 +02:00
2024-09-15 09:13:19 -07:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2024-09-26 13:03:02 +02:00
2024-09-03 10:47:17 +02:00
2024-02-21 12:03:22 +01:00
2024-10-30 13:17:36 +01:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2024-10-21 11:31:26 +02:00
2024-10-21 11:31:26 +02:00
2024-01-17 12:02:48 +01:00
2024-10-09 23:20:46 +02:00
2024-06-28 17:57:50 +02:00
2024-10-09 23:20:46 +02:00
2024-10-21 11:31:26 +02:00