aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorAlexander Kuznetsov <[email protected]>2021-06-09 10:17:19 +0300
committerTejun Heo <[email protected]>2021-06-10 09:58:50 -0400
commitb7e24eb1caa5f8da20d405d262dba67943aedc42 (patch)
tree69baa641c0dba6e5b9c25ff0d86fd8226d262791 /drivers/fpga/fpga-bridge.c
parent08b2b6fdf6b26032f025084ce2893924a0cdb4a2 (diff)
cgroup1: don't allow '\n' in renaming
cgroup_mkdir() have restriction on newline usage in names: $ mkdir $'/sys/fs/cgroup/cpu/test\ntest2' mkdir: cannot create directory '/sys/fs/cgroup/cpu/test\ntest2': Invalid argument But in cgroup1_rename() such check is missed. This allows us to make /proc/<pid>/cgroup unparsable: $ mkdir /sys/fs/cgroup/cpu/test $ mv /sys/fs/cgroup/cpu/test $'/sys/fs/cgroup/cpu/test\ntest2' $ echo $$ > $'/sys/fs/cgroup/cpu/test\ntest2' $ cat /proc/self/cgroup 11:pids:/ 10:freezer:/ 9:hugetlb:/ 8:cpuset:/ 7:blkio:/user.slice 6:memory:/user.slice 5:net_cls,net_prio:/ 4:perf_event:/ 3:devices:/user.slice 2:cpu,cpuacct:/test test2 1:name=systemd:/ 0::/ Signed-off-by: Alexander Kuznetsov <[email protected]> Reported-by: Andrey Krasichkov <[email protected]> Acked-by: Dmitry Yakunin <[email protected]> Cc: [email protected] Signed-off-by: Tejun Heo <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions