lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 5 Aug 2018 11:41:50 +0800
From:   禹舟键 <ufo19890607@...il.com>
To:     Wind Yu <yuzhoujian@...ichuxing.com>
Cc:     mhocko@...nel.org, rientjes@...gle.com, rong.a.chen@...el.com,
        sfr@...b.auug.org.au, kirill.shutemov@...ux.intel.com,
        aarcange@...hat.com, penguin-kernel@...ove.sakura.ne.jp,
        guro@...com, yang.s@...baba-inc.com, akpm@...ux-foundation.org,
        linux-kernel@...r.kernel.org, lkp@...org
Subject: Re: [LKP] [mm, oom] c1e4c54f9c: BUG:KASAN:null-ptr-deref_in_d

Hi Michal and David,
AFAICS, the null pointer is the task_struct of p in the dump_header.
Why don't we just add a if before printing the victim task's
informaiton.

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -438,14 +438,6 @@ static void dump_header(struct oom_control *oc,
struct task_struct *p)

        cpuset_print_current_mems_allowed();
        mem_cgroup_print_oom_context(oc->memcg, p);
-       pr_cont(",task=%s,pid=%d,uid=%d\n", p->comm, p->pid,
-               from_kuid(&init_user_ns, task_uid(p)));
+      if (p)
+              pr_cont(",task=%s,pid=%d,uid=%d", p->comm, p->pid,
+                      from_kuid(&init_user_ns, task_uid(p)));
+     pr_cont("\n");
        if (is_memcg_oom(oc))
                mem_cgroup_print_oom_meminfo(oc->memcg);

Thanks
Zhoujian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ