Taehee Yoo
e8b258ce87
netfilter: xt_IDLETIMER: add sysfs filename checking routine
[ Upstream commit 54451f60c8 ]
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: 0902b469bd ("netfilter: xtables: idletimer target implementation")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-27 16:13:03 +01:00
..
2018-07-06 12:32:12 +02:00
2018-11-21 09:19:12 +01:00
2017-11-21 15:57:07 -08:00
2018-07-24 14:10:43 -07:00
2018-06-28 10:40:47 -07:00
2018-11-04 14:50:51 +01:00
2018-07-24 14:10:42 -07:00
2018-09-14 17:59:20 +02:00
2018-09-26 12:39:32 +03:00
2018-08-03 00:47:32 +02:00
2018-10-17 22:03:40 -07:00
2018-11-04 14:50:54 +01:00
2018-11-04 14:50:51 +01:00
2018-06-28 10:40:47 -07:00
2018-08-13 17:55:44 +02:00
2018-11-23 08:17:03 +01:00
2018-07-27 13:17:50 -07:00
2018-11-04 14:50:51 +01:00
2018-08-09 14:11:24 -07:00
2018-07-24 14:10:43 -07:00
2018-08-27 15:24:33 -07:00
2018-06-26 11:33:04 +09:00
2017-10-25 13:00:27 +09:00
2018-08-06 11:21:15 +02:00
2018-04-22 21:12:00 -04:00
2018-11-23 08:17:05 +01:00
2018-11-27 16:13:01 +01:00
2018-11-04 14:50:51 +01:00
2018-09-17 18:43:42 -07:00
2018-07-27 09:33:37 -07:00
2018-11-23 08:17:05 +01:00
2016-09-10 23:12:53 -07:00
2017-11-21 16:35:54 -08:00
2018-10-15 22:01:37 -07:00
2018-10-01 09:13:48 +02:00
2018-08-06 11:21:37 +02:00
2018-09-24 12:19:27 -07:00
2018-08-22 21:39:08 -07:00
2018-11-27 16:13:03 +01:00
2018-09-21 18:58:34 -07:00
2018-08-05 13:04:31 -07:00
2018-06-28 10:40:47 -07:00
2018-11-04 14:50:51 +01:00
2018-07-12 16:55:29 -07:00
2018-11-04 14:50:52 +01:00
2018-10-04 22:23:15 -07:00
2018-06-28 10:40:47 -07:00
2017-11-01 12:19:03 +09:00
2018-07-05 20:20:03 +09:00
2018-10-10 22:19:52 -07:00
2018-09-03 22:12:02 -07:00
2018-06-28 10:40:47 -07:00
2018-11-23 08:17:07 +01:00
2018-11-23 08:17:04 +01:00
2018-11-23 08:17:06 +01:00
2018-11-04 14:50:52 +01:00
2018-08-01 10:00:06 -07:00
2018-11-21 09:19:23 +01:00
2017-11-10 13:41:40 +09:00
2018-11-23 08:17:04 +01:00
2018-09-17 08:03:09 -07:00
2018-11-04 14:50:51 +01:00
2018-08-07 12:39:13 -07:00
2018-07-24 14:10:42 -07:00
2018-10-01 09:14:03 +02:00
2018-07-24 14:10:42 -07:00
2018-10-11 10:19:01 +02:00
2018-10-11 13:24:46 +02:00
2018-08-06 10:42:48 -07:00
2018-07-24 14:10:43 -07:00
2018-06-28 13:36:39 +09:00
2018-10-18 16:43:06 -07:00
2018-03-27 13:18:09 -04:00