diff mbox

cgroups: censor kernel pointer in debug files

Message ID 20170225095648.GA4917@beast (mailing list archive)
State New, archived
Headers show

Commit Message

Kees Cook Feb. 25, 2017, 9:56 a.m. UTC
As found in grsecurity, this avoids exposing a kernel pointer through
the cgroup debug entries.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 kernel/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tejun Heo March 6, 2017, 8:16 p.m. UTC | #1
On Sat, Feb 25, 2017 at 01:56:48AM -0800, Kees Cook wrote:
> As found in grsecurity, this avoids exposing a kernel pointer through
> the cgroup debug entries.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied to cgroup/for-4.11-fixes.

Thanks.
diff mbox

Patch

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 53bbca7c4859..b794bcadefa4 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -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)