Skip to contentSkip to conversation

cgroups: censor kernel pointer in debug files

PATCH Applied Kees Cook 2 participants 2 messages Feb 25, 2017 – Mar 6, 2017 cgroup

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 cgroups: censor kernel pointer in debug files

As found in grsecurity, this avoids exposing a kernel pointer through the cgroup debug entries.

---
 kernel/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cgroup.c +1 -1
index 53bbca7c4859..b794bcadefa4 100644
@@ -6589,7 +6589,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
 		struct task_struct *task;
 		int count = 0;
 
-		seq_printf(seq, "css_set %p\n", cset);
+		seq_printf(seq, "css_set %pK\n", cset);
 
 		list_for_each_entry(task, &cset->tasks, cg_list) {
 			if (count++ > MAX_TASKS_SHOWN_PER_CSS)
Signature · 6 lines
2.7.4


-- 
Kees Cook
Pixel Security
maintainer Applied
#1 lore raw
Quoted 4 lines · Kees Cook

As found in grsecurity, this avoids exposing a kernel pointer through the cgroup debug entries.

Applied to cgroup/for-4.11-fixes.

Thanks.

Signature · 1 line
tejun