Taehee Yoo
54451f60c8
netfilter: xt_IDLETIMER: add sysfs filename checking routine
...
When IDLETIMER rule is added, sysfs file is created under
/sys/class/xt_idletimer/timers/
But some label name shouldn't be used.
".", "..", "power", "uevent", "subsystem", etc...
So that sysfs filename checking routine is needed.
test commands:
%iptables -I INPUT -j IDLETIMER --timeout 1 --label "power"
splat looks like:
[95765.423132] sysfs: cannot create duplicate filename '/devices/virtual/xt_idletimer/timers/power'
[95765.433418] CPU: 0 PID: 8446 Comm: iptables Not tainted 4.19.0-rc6+ #20
[95765.449755] Call Trace:
[95765.449755] dump_stack+0xc9/0x16b
[95765.449755] ? show_regs_print_info+0x5/0x5
[95765.449755] sysfs_warn_dup+0x74/0x90
[95765.449755] sysfs_add_file_mode_ns+0x352/0x500
[95765.449755] sysfs_create_file_ns+0x179/0x270
[95765.449755] ? sysfs_add_file_mode_ns+0x500/0x500
[95765.449755] ? idletimer_tg_checkentry+0x3e5/0xb1b [xt_IDLETIMER]
[95765.449755] ? rcu_read_lock_sched_held+0x114/0x130
[95765.449755] ? __kmalloc_track_caller+0x211/0x2b0
[95765.449755] ? memcpy+0x34/0x50
[95765.449755] idletimer_tg_checkentry+0x4e2/0xb1b [xt_IDLETIMER]
[ ... ]
Fixes: 0902b469bd25 ("netfilter: xtables: idletimer target implementation")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-11-03 13:28:01 +01:00
..
2018-11-01 00:29:46 +01:00
2018-10-08 10:39:04 -07:00
2018-07-10 20:06:34 -07:00
2018-09-17 11:40:08 +02:00
2018-09-17 11:40:08 +02:00
2018-07-18 11:26:37 +02:00
2018-03-20 13:44:14 +01:00
2017-06-19 19:13:21 +02:00
2018-06-28 22:21:32 +09:00
2018-09-20 18:07:35 +02:00
2018-03-20 13:44:14 +01:00
2018-09-20 18:07:35 +02:00
2018-04-17 10:59:43 +02:00
2018-04-24 10:29:14 +02:00
2018-01-08 18:01:05 +01:00
2018-01-08 18:01:26 +01:00
2018-08-03 18:37:55 +02:00
2018-04-24 10:29:14 +02:00
2017-04-26 09:30:22 +02:00
2018-03-30 11:41:18 -04:00
2018-09-21 10:14:46 +02:00
2017-07-24 13:24:46 +02:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:07:35 +02:00
2018-10-08 21:28:55 -07:00
2018-09-20 18:07:35 +02:00
2018-09-20 18:08:14 +02:00
2018-04-24 10:29:14 +02:00
2017-04-26 09:30:22 +02:00
2018-05-06 21:51:37 -04:00
2018-03-30 11:41:18 -04:00
2018-09-20 18:07:35 +02:00
2018-04-24 10:29:14 +02:00
2018-08-07 17:14:15 +02:00
2018-03-20 13:44:14 +01:00
2017-05-29 11:32:36 +02:00
2018-10-22 20:21:30 -07:00
2018-04-24 10:28:45 +02:00
2018-09-28 14:28:38 +02:00
2018-05-23 09:14:05 +02:00
2018-06-28 22:21:32 +09:00
2018-03-27 13:18:09 -04:00
2018-06-26 16:48:40 +02:00
2017-04-06 22:01:38 +02:00
2018-08-03 18:37:55 +02:00
2018-03-20 13:44:14 +01:00
2018-09-20 18:26:56 +02:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-09-17 16:11:14 +02:00
2018-04-24 10:29:12 +02:00
2018-01-10 15:32:15 +01:00
2017-11-02 11:10:55 +01:00
2018-05-16 07:24:30 +02:00
2018-10-22 20:21:30 -07:00
2018-09-28 14:28:29 +02:00
2018-07-06 19:31:53 +02:00
2017-07-31 20:41:57 +02:00
2018-08-16 19:37:00 +02:00
2018-06-12 16:19:22 -07:00
2018-10-16 10:01:48 +02:00
2018-06-06 18:39:49 -07:00
2018-10-16 10:01:48 +02:00
2018-09-12 22:22:42 -07:00
2018-07-18 11:26:48 +02:00
2017-05-15 12:51:41 +02:00
2016-11-09 23:42:23 +01:00
2018-08-16 19:37:03 +02:00
2018-09-17 16:11:12 +02:00
2018-10-11 11:29:53 +02:00
2018-07-18 11:26:37 +02:00
2018-06-03 00:02:11 +02:00
2018-09-28 14:28:34 +02:00
2018-10-19 14:00:33 +02:00
2018-09-17 11:29:49 +02:00
2018-04-27 00:00: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
2018-10-19 13:25:22 +02:00
2018-10-19 14:00:33 +02:00
2018-06-01 09:38:40 +02:00
2018-07-17 20:48:24 +02:00
2018-05-23 09:50:28 +02:00
2018-06-07 16:14:00 -04:00
2018-09-17 11:29:49 +02:00
2018-01-10 15:32:08 +01:00
2018-09-28 14:28:34 +02:00
2018-04-24 10:29:12 +02:00
2018-10-29 11:11:33 +01:00
2018-09-17 11:29:49 +02:00
2018-10-25 10:18:31 +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
2018-01-10 15:32:08 +01:00
2017-03-06 18:22:12 +01:00
2018-09-17 16:11:12 +02:00
2018-09-17 11:29:49 +02:00
2018-08-16 19:36:59 +02:00
2018-09-28 14:28:43 +02:00
2018-10-11 11:29:14 +02:00
2018-07-18 11:26:52 +02:00
2018-08-16 19:37:10 +02:00
2018-08-04 00:53:29 +02:00
2018-10-16 10:01:49 +02:00
2018-07-16 17:51:48 +02:00
2018-08-16 19:37:05 +02:00
2018-02-14 21:05:37 +01:00
2018-06-19 10:43:55 -04:00
2018-02-14 21:05:38 +01:00
2018-09-17 16:11:03 +02:00
2018-08-24 09:58:16 +02:00
2018-08-23 20:26:53 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-07-30 14:07:09 +02:00
2018-06-12 19:35:52 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-09-20 18:07:35 +02:00
2016-11-03 10:56:21 +01:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:38 +01:00
2018-09-11 01:35:32 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:37 +01:00
2018-11-03 13:28:01 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:39 +01:00
2018-03-05 23:15:50 +01:00
2016-11-03 10:56:21 +01:00
2015-05-14 13:00:27 +02:00
2016-12-06 21:48:20 +01:00
2018-10-16 19:34:49 +02:00
2018-04-24 10:29:12 +02:00
2018-03-05 23:15:43 +01:00
2018-04-19 13:02:44 +02:00
2018-02-14 21:05:35 +01:00
2018-10-16 10:01:50 +02:00
2018-06-28 22:21:32 +09:00
2018-02-14 21:05:38 +01:00
2017-01-18 20:32:43 +01:00
2018-02-14 21:05:37 +01:00
2018-10-19 14:00:34 +02:00
2018-03-05 23:15:44 +01:00
2018-03-05 23:15:44 +01:00
2018-06-28 22:21:32 +09:00
2018-04-24 10:29:12 +02:00
2017-11-02 11:10:55 +01:00
2017-07-01 09:08:41 -07:00
2018-09-17 16:11:12 +02:00
2018-06-06 14:00:54 +02:00
2018-09-28 14:47:41 +02:00
2018-02-14 21:05:38 +01:00
2018-01-31 14:59:24 +01:00
2018-03-30 11:04:12 +02:00
2018-02-14 21:05:38 +01:00
2015-08-17 21:33:06 -07:00
2016-07-03 10:55:07 +02:00
2018-10-11 11:29:14 +02:00
2018-03-20 13:44:14 +01:00
2018-07-20 22:28:28 -07:00
2016-06-23 13:26:49 +02:00