Liping Zhang
9338d7b441
netfilter: nfnl_cthelper: reject del request if helper obj is in use
...
We can still delete the ct helper even if it is in use, this will cause
a use-after-free error. In more detail, I mean:
# nfct helper add ssdp inet udp
# iptables -t raw -A OUTPUT -p udp -j CT --helper ssdp
# nfct helper delete ssdp //--> oops, succeed!
BUG: unable to handle kernel paging request at 000026ca
IP: 0x26ca
[...]
Call Trace:
? ipv4_helper+0x62/0x80 [nf_conntrack_ipv4]
nf_hook_slow+0x21/0xb0
ip_output+0xe9/0x100
? ip_fragment.constprop.54+0xc0/0xc0
ip_local_out+0x33/0x40
ip_send_skb+0x16/0x80
udp_send_skb+0x84/0x240
udp_sendmsg+0x35d/0xa50
So add reference count to fix this issue, if ct helper is used by
others, reject the delete request.
Apply this patch:
# nfct helper delete ssdp
nfct v1.4.3: netlink error: Device or resource busy
Signed-off-by: Liping Zhang <zlpnobody@gmail.com >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
2017-05-15 12:42:29 +02:00
..
2017-01-12 04:01:17 -05:00
2017-04-12 22:02:37 +02:00
2017-03-09 17:01:09 -08:00
2017-05-15 12:42:29 +02:00
2017-04-25 09:04:30 +02:00
2017-04-05 10:15:20 +02:00
2017-04-18 13:39:50 -04:00
2017-04-06 13:28:35 -07:00
2017-04-12 22:02:36 +02:00
2017-01-25 12:37:04 -05:00
2017-05-08 17:31:24 -04:00
2017-04-06 10:11:59 +01:00
2016-09-04 13:29:29 -07:00
2017-04-24 12:35:56 -04:00
2017-02-07 13:07:46 -05:00
2017-04-21 15:28:37 -04:00
2017-03-24 20:49:31 -07:00
2016-06-27 15:06:17 -04:00
2017-05-08 13:09:38 +02:00
2016-07-08 12:20:57 +02:00
2017-01-20 12:12:13 -05:00
2017-02-04 19:44:22 -05:00
2016-04-19 20:09:25 -04:00
2016-04-25 16:44:27 -04:00
2016-06-25 12:19:35 -04:00
2016-04-25 16:44:27 -04:00
2016-06-09 23:41:03 -07:00
2017-04-22 20:26:37 +03:00
2017-04-20 13:48:54 -04:00
2016-11-09 13:41:54 -05:00
2017-02-07 13:07:46 -05:00
2017-02-11 21:25:18 -05:00
2017-04-14 10:06:42 +02:00
2017-04-17 15:35:38 -04:00
2017-04-24 14:30:46 -04:00
2017-04-03 19:04:48 -07:00
2017-04-03 19:04:48 -07:00
2016-05-20 18:03:16 -04:00
2016-09-30 13:29:21 +02:00
2016-09-30 13:29:21 +02:00
2016-12-05 15:21:59 -05:00
2017-04-13 13:58:22 -04:00
2016-06-17 20:23:32 -07:00
2016-08-18 01:17:32 -04:00
2017-02-08 14:38:18 -05:00
2016-07-25 17:55:43 -07:00
2016-03-14 12:19:46 -04:00
2016-04-27 22:48:25 -04:00
2017-01-25 16:00:33 +01:00
2017-01-27 10:25:34 -05:00
2017-02-03 15:16:45 -05:00
2017-01-18 13:04:28 -05:00
2016-04-04 22:11:20 -04:00
2017-03-09 18:23:27 -08:00
2017-03-09 18:23:27 -08:00
2016-08-13 15:08:00 -07:00
2017-01-20 11:27:22 -05:00
2017-01-18 13:04:29 -05:00
2017-01-25 14:04:38 -05:00
2016-12-29 11:38:31 -05:00
2016-03-13 23:55:13 -04:00
2017-02-04 19:58:14 -05:00
2017-05-04 12:51:24 -04:00
2017-04-21 13:21:30 -04:00
2017-03-21 15:27:19 -07:00
2017-04-21 13:21:31 -04:00
2017-04-28 12:00:10 +02:00
2017-04-13 13:19:48 -04:00
2017-01-31 13:16:59 -05:00
2017-01-13 09:38:42 +01:00
2016-08-17 19:36:23 -04:00
2016-10-13 12:05:26 -04:00
2017-02-11 02:31:11 -05:00
2017-05-08 11:11:56 +02:00
2016-07-08 13:23:12 +02:00
2017-04-01 20:21:44 -07:00
2016-10-03 02:00:22 -04:00
2016-10-04 02:11:51 -04:00
2017-03-28 22:02:21 -07:00
2017-04-12 13:59:21 -04:00
2017-04-04 17:35:58 +02:00
2016-07-05 09:06:29 -07:00
2016-06-27 15:06:18 -04:00
2017-04-13 13:58:22 -04:00
2016-07-08 12:20:57 +02:00
2016-03-23 22:09:58 -04:00
2017-02-17 12:08:05 -05:00
2017-03-12 22:53:02 -07:00
2016-08-15 10:55:53 -07:00
2017-03-24 13:17:07 -07:00
2017-01-24 13:44:28 -05:00
2016-10-23 19:35:24 -04:00
2016-10-23 19:35:24 -04:00
2016-12-25 17:21:22 +01:00
2016-12-29 11:38:31 -05:00
2017-05-08 22:35:32 -04:00
2017-04-17 15:35:38 -04:00
2017-04-21 13:58:15 -04:00
2017-03-02 08:42:31 +01:00
2017-05-05 12:00:11 -04:00
2016-11-09 20:40:06 -05:00
2016-11-09 20:40:06 -05:00
2017-01-09 16:07:41 -05:00
2016-04-28 11:49:45 -04:00
2017-04-02 19:34:55 -07:00
2016-08-28 23:32:41 -04:00
2017-02-10 11:46:39 -05:00
2017-05-08 14:37:07 -04:00
2016-05-03 16:08:14 -04:00
2016-06-17 20:23:32 -07:00
2017-03-24 13:17:07 -07:00
2016-12-16 10:24:44 -08:00
2016-11-15 12:16:13 -05:00
2017-04-14 10:07:28 +02:00