Qi Tang
a242a9ae58
netfilter: nf_conntrack_helper: pass helper to expect cleanup
...
nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy()
to remove expectations belonging to the helper being unregistered.
However, it passes NULL instead of the helper pointer as the data
argument, so expect_iter_me() never matches any expectation and all
of them survive the cleanup.
After unregister returns, nfnl_cthelper_del() frees the helper
object immediately. Subsequent expectation dumps or packet-driven
init_conntrack() calls then dereference the freed exp->helper,
causing a use-after-free.
Pass the actual helper pointer so expectations referencing it are
properly destroyed before the helper object is freed.
BUG: KASAN: slab-use-after-free in string+0x38f/0x430
Read of size 1 at addr ffff888003b14d20 by task poc/103
Call Trace:
string+0x38f/0x430
vsnprintf+0x3cc/0x1170
seq_printf+0x17a/0x240
exp_seq_show+0x2e5/0x560
seq_read_iter+0x419/0x1280
proc_reg_read+0x1ac/0x270
vfs_read+0x179/0x930
ksys_read+0xef/0x1c0
Freed by task 103:
The buggy address is located 32 bytes inside of
freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)
Fixes: ac7b848390 ("netfilter: expect: add and use nf_ct_expect_iterate helpers")
Signed-off-by: Qi Tang <tpluszz77@gmail.com >
Reviewed-by: Phil Sutter <phil@nwl.cc >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
2026-04-01 11:55:29 +02:00
..
2026-04-01 11:55:29 +02:00
2026-02-22 08:26:33 -08:00
2025-05-23 13:57:12 +02:00
2025-07-25 18:38:50 +02:00
2025-11-27 23:59:43 +00:00
2026-03-19 10:26:31 +01:00
2026-02-21 17:09:51 -08:00
2022-02-04 06:30:28 +01:00
2026-02-17 15:04:20 +01:00
2026-02-11 19:31:52 -08:00
2026-03-26 13:24:40 +01:00
2026-02-21 17:09:51 -08:00
2026-03-26 13:18:32 +01:00
2026-03-26 13:28:03 +01:00
2023-09-13 21:57:50 +02:00
2026-02-17 15:04:20 +01:00
2026-03-13 15:31:15 +01:00
2026-03-26 13:18:31 +01:00
2026-04-01 11:55:29 +02:00
2026-02-17 15:04:20 +01:00
2023-10-24 13:16:30 +02:00
2022-01-11 10:41:44 +01:00
2026-03-26 13:28:17 +01:00
2026-02-06 20:50:03 -08:00
2022-07-11 16:25:15 +02:00
2026-01-20 16:23:37 +01:00
2026-02-21 01:02:28 -08:00
2026-01-20 16:23:37 +01:00
2026-01-20 16:23:37 +01:00
2026-03-13 15:31:14 +01:00
2026-03-26 13:28:17 +01:00
2023-02-01 12:18:51 +01:00
2025-07-03 13:51:39 +02:00
2022-08-11 16:50:25 +02:00
2022-02-04 06:30:28 +01:00
2026-03-26 13:28:17 +01:00
2026-02-17 15:04:20 +01:00
2025-10-30 12:52:45 +01:00
2026-02-17 15:04:20 +01:00
2022-07-11 16:25:15 +02:00
2022-02-04 06:30:28 +01:00
2025-05-23 13:57:12 +02:00
2026-01-02 12:04:28 -08:00
2026-02-06 13:34:55 +01:00
2024-09-12 15:41:03 +02:00
2026-03-13 15:31:15 +01:00
2026-04-01 11:50:14 +02:00
2026-01-20 16:23:37 +01:00
2022-07-11 16:25:14 +02:00
2026-02-21 01:02:28 -08:00
2024-07-24 20:59:29 +02:00
2024-06-19 18:41:59 +02:00
2026-02-06 20:50:03 -08:00
2026-02-21 01:02:28 -08:00
2022-09-07 16:46:04 +02:00
2026-01-02 12:04:28 -08:00
2026-02-21 17:09:51 -08: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
2026-02-21 01:02:28 -08:00
2026-01-20 16:23:37 +01:00
2026-01-20 16:23:37 +01:00
2023-11-08 16:40:30 +01:00
2022-09-07 16:46:04 +02:00
2024-02-21 12:03:22 +01:00
2020-07-24 15:41:54 -07:00
2026-01-20 16:23:37 +01:00
2026-03-19 10:26:31 +01:00
2025-03-23 10:53:47 +01:00
2026-02-21 17:09:51 -08:00
2025-07-14 15:22:35 +02:00
2026-02-21 17:09:51 -08:00
2026-03-10 14:10:42 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-01 11:55:29 +02:00
2026-03-19 10:27:07 +01:00
2026-03-10 14:10:42 +01:00
2026-02-21 17:09:51 -08:00
2024-11-15 12:07:04 +01:00
2024-10-02 17:23:23 -04:00
2026-03-10 14:10:42 +01: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
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-17 15:04:20 +01:00
2023-05-03 13:49:08 +02:00
2026-03-13 15:31:15 +01:00
2024-08-20 12:37:24 +02:00
2026-03-13 15:31:15 +01:00
2025-07-03 13:51:39 +02: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
2026-01-20 16:23:37 +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
2025-05-23 13:57:12 +02:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-12-16 11:04:14 -05:00
2025-10-30 12:52:45 +01: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
2026-02-21 01:02:28 -08:00
2025-10-08 13:17:25 +02:00
2024-09-03 10:47:17 +02:00
2025-09-02 15:28:18 +02:00
2024-09-03 10:47:17 +02:00
2026-02-21 01:02:28 -08: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-10 20:28:24 +02:00
2026-03-05 13:22:37 +01:00
2026-03-25 21:38:27 +01:00
2025-08-20 13:52:37 +02:00
2026-03-10 14:10:42 +01:00
2026-03-05 13:22:37 +01:00
2026-03-26 13:18:31 +01:00
2025-08-07 13:19:26 +02:00
2026-01-20 16:23:37 +01:00
2024-09-03 10:47:17 +02:00
2025-05-23 13:57:12 +02:00
2024-12-05 10:01:28 +01:00
2024-02-21 12:03:22 +01:00
2026-02-21 17:09:51 -08:00
2024-10-09 23:20:46 +02:00
2025-12-16 11:04:14 -05:00
2021-08-17 00:45:07 +02:00
2026-04-01 11:55:29 +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
2025-11-28 00:05:49 +00:00
2024-10-09 23:20:46 +02:00
2024-10-09 23:20:46 +02:00
2026-03-13 15:31:15 +01:00
2026-03-10 14:10:42 +01:00
2022-07-11 16:40:45 +02:00
2026-02-21 17:09:51 -08:00
2020-08-28 19:55:51 +02:00
2026-03-10 14:10:43 +01:00
2026-02-21 17:09:51 -08:00
2023-02-22 21:25:23 -08:00
2026-02-21 17:09:51 -08:00
2021-09-21 03:46:56 +02:00
2025-05-22 17:16:02 +02:00
2020-06-25 00:50:31 +02:00
2025-07-25 18:40:43 +02:00
2024-10-21 11:31:26 +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
2026-02-21 17:09:51 -08:00
2026-04-01 11:55:29 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2023-03-22 21:48:59 +01:00
2025-03-23 10:53:47 +01:00
2023-08-30 17:34:01 +02:00
2024-10-09 23:20:46 +02:00
2023-07-29 18:13:41 +01:00
2026-02-21 17:09:51 -08:00
2026-01-20 16:23:38 +01:00
2022-07-11 16:40:45 +02:00
2025-05-22 17:16:02 +02:00
2026-03-10 14:10:42 +01:00
2026-02-21 17:09:51 -08:00
2026-03-13 15:31:15 +01: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