Pablo Neira Ayuso
cf23d531a9
netfilter: nf_tables: reject duplicate device on updates
...
commit cf5fb87fcd upstream.
A chain/flowtable update with duplicated devices in the same batch is
possible. Unfortunately, netdev event path only removes the first
device that is found, leaving unregistered the hook of the duplicated
device.
Check if a duplicated device exists in the transaction batch, bail out
with EEXIST in such case.
WARNING is hit when unregistering the hook:
[49042.221275] WARNING: CPU: 4 PID: 8425 at net/netfilter/core.c:340 nf_hook_entry_head+0xaa/0x150
[49042.221375] CPU: 4 UID: 0 PID: 8425 Comm: nft Tainted: G S 6.16.0+ #170 PREEMPT(full)
[...]
[49042.221382] RIP: 0010:nf_hook_entry_head+0xaa/0x150
Fixes: 78d9f48f7f ("netfilter: nf_tables: add devices to existing flowtable")
Fixes: b9703ed44f ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
Signed-off-by: Florian Westphal <fw@strlen.de >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-11-24 10:35:57 +01:00
..
2025-10-15 12:00:10 +02:00
2025-10-15 12:00:16 +02: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
2025-08-15 12:13:59 +02:00
2025-03-22 12:54:13 -07:00
2022-02-04 06:30:28 +01:00
2019-07-16 13:16:59 +02:00
2024-05-22 15:00:56 -07:00
2023-11-08 13:52:32 +01:00
2025-07-24 08:56:33 +02:00
2023-02-22 00:28:47 +01:00
2024-02-21 11:57:11 +01:00
2023-09-13 21:57:50 +02:00
2022-09-20 23:50:03 +02:00
2024-03-07 03:10:35 +01:00
2022-08-11 16:50:49 +02:00
2019-06-19 17:09:52 +02:00
2025-09-09 18:58:07 +02:00
2022-09-07 15:55:23 +02:00
2023-10-24 13:16:30 +02:00
2022-01-11 10:41:44 +01:00
2025-08-20 18:30:17 +02:00
2023-03-08 14:25:41 +01:00
2022-07-11 16:25:15 +02:00
2024-05-06 11:13:56 +02:00
2019-06-19 17:09:55 +02:00
2023-07-05 14:42:15 +02:00
2021-06-18 14:47:43 +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
2023-02-01 12:18:51 +01:00
2023-11-08 13:52:32 +01:00
2022-08-11 16:50:25 +02:00
2022-02-04 06:30:28 +01:00
2023-06-26 17:18:48 +02:00
2019-05-30 11:26:32 -07:00
2025-05-29 11:02:20 +02:00
2019-07-16 13:16:59 +02:00
2022-07-11 16:25:15 +02:00
2022-02-04 06:30:28 +01:00
2022-06-21 10:50:41 +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
2022-07-11 16:25:14 +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
2022-09-07 16:46:04 +02:00
2024-01-31 20:40:56 -08:00
2025-06-19 15:32:19 +02:00
2022-09-07 16:46:04 +02:00
2022-11-18 02:15:15 +01:00
2022-09-07 16:46:04 +02:00
2022-05-13 18:56:27 +02:00
2024-01-03 11:17:17 +01:00
2023-10-30 14:36:57 -07:00
2023-11-08 16:40:30 +01:00
2022-09-07 16:46:04 +02:00
2019-07-16 13:16:59 +02:00
2024-02-21 12:03:22 +01:00
2020-07-24 15:41:54 -07:00
2024-10-02 17:23:23 -04:00
2025-11-24 10:35:57 +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
2021-05-29 01:04:53 +02:00
2022-07-11 16:25:15 +02:00
2024-06-26 00:54:53 +02:00
2023-04-21 11:34:14 -07:00
2024-01-17 12:02:47 +01:00
2023-11-08 13:52:32 +01:00
2024-08-19 18:44:50 +02:00
2025-10-15 12:00:16 +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
2023-11-08 13:52:32 +01:00
2021-05-29 01:04:54 +02:00
2024-08-20 12:37:24 +02:00
2025-03-22 12:54:10 -07:00
2024-05-10 11:13:45 +02:00
2024-09-03 10:47:16 +02:00
2023-05-03 13:49:08 +02:00
2025-03-22 12:54:10 -07:00
2024-08-20 12:37:24 +02:00
2025-09-19 16:35:49 +02:00
2025-03-22 12:54:13 -07:00
2022-03-20 00:29:47 +01:00
2022-03-20 00:29:47 +01:00
2024-09-03 10:47:17 +02:00
2025-02-08 09:57:25 +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-12-14 20:03:07 +01: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
2025-09-19 16:35:50 +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
2025-10-19 16:33:42 +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
2025-06-19 15:31:46 +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
2025-09-19 16:35:49 +02:00
2025-09-19 16:35:49 +02:00
2025-09-19 16:35:49 +02:00
2021-05-29 01:04:27 +02:00
2025-09-19 16:35:51 +02:00
2024-07-17 19:00:47 +02:00
2025-09-19 16:35:49 +02:00
2024-12-14 20:03:03 +01:00
2024-09-03 10:47:17 +02:00
2024-09-03 10:47:17 +02:00
2025-06-19 15:31:53 +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
2021-06-01 23:53:51 +02:00
2021-08-17 00:45:07 +02:00
2019-06-19 17:09:55 +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
2019-05-21 10:50:45 +02:00
2024-10-09 23:20:46 +02:00
2019-06-19 17:09:55 +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
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2024-10-09 23:20:46 +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
2022-07-11 16:40:45 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2022-01-22 08:33:37 +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
2020-08-28 19:55:51 +02:00
2024-12-19 18:13:18 +01: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
2024-12-14 20:03:03 +01:00
2023-02-22 21:25:23 -08:00
2021-05-29 01:04:52 +02:00
2021-09-21 03:46:56 +02:00
2019-06-19 17:09:55 +02:00
2025-06-19 15:31:52 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-06-25 00:50:31 +02:00
2019-06-19 17:09:55 +02:00
2025-08-15 12:13:47 +02:00
2024-10-21 11:31:26 +02:00
2019-06-19 17:09:55 +02:00
2023-06-20 22:43:42 +02:00
2023-12-06 17:52:15 +01:00
2024-01-17 12:02:48 +01: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
2024-10-09 23:20:46 +02:00
2019-06-19 17:09:55 +02:00
2024-06-28 17:57:50 +02:00
2023-03-22 21:48:59 +01:00
2023-08-22 15:13:21 +02:00
2023-08-30 17:34:01 +02:00
2024-10-09 23:20:46 +02:00
2019-08-13 12:14:26 +02:00
2023-07-29 18:13:41 +01:00
2019-06-19 17:09:55 +02:00
2022-10-11 17:42:58 -06:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2022-07-11 16:40:45 +02:00
2025-06-19 15:31:52 +02:00
2023-03-22 21:48:59 +01:00
2019-05-21 11:28:40 +02:00
2020-07-29 20:09:18 +02:00
2022-07-21 00:56:00 +02:00
2024-10-21 11:31:26 +02:00
2023-08-30 17:34:01 +02:00