Security: fix sts testPocCVE_2016_6753 [1/1]
authorJiamin Ma <jiamin.ma@amlogic.com>
Sun, 28 Apr 2019 10:15:19 +0000 (18:15 +0800)
committerJiamin Ma <jiamin.ma@amlogic.com>
Sun, 28 Apr 2019 10:22:15 +0000 (03:22 -0700)
PD#SWPL-7852

Problem:
android.security.sts.Poc16_11#testPocCVE_2016_6753 fail

Solution:
do not expose kernel addr info via cgroup_css_links_read

Verify:
U200

Change-Id: I74e4904e8b662db9d6589a1926c62c87e12d6f6f
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
kernel/cgroup.c

index 0feeaca..8ecb222 100644 (file)
@@ -6600,7 +6600,15 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
                struct task_struct *task;
                int count = 0;
 
+               /*
+                * Fix for android.security.sts.Poc16_11#testPocCVE_2016_6753
+                * We should not expose kernel address info to user space
+                */
+#ifdef CONFIG_AMLOGIC_MODIFY
+               seq_puts(seq, "css_set (____ptrval____)\n");
+#else
                seq_printf(seq, "css_set %p\n", cset);
+#endif
 
                list_for_each_entry(task, &cset->tasks, cg_list) {
                        if (count++ > MAX_TASKS_SHOWN_PER_CSS)