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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgwApdvLhxFU26j5@dhcp22.suse.cz>
Date:   Tue, 15 Feb 2022 20:36:05 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Suren Baghdasaryan <surenb@...gle.com>
Cc:     Yang Shi <shy828301@...il.com>,
        syzbot <syzbot+2ccf63a4bd07cf39cab0@...kaller.appspotmail.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christian Brauner <brauner@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux MM <linux-mm@...ck.org>,
        syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] KASAN: use-after-free Read in __oom_reap_task_mm

On Tue 15-02-22 10:10:53, Suren Baghdasaryan wrote:
> On Tue, Feb 15, 2022 at 9:53 AM Yang Shi <shy828301@...il.com> wrote:
[...]
> > Isn't the below race possible?
> >
> >           CPU A                                     CPU B
> > exiting:
> >   mmap_write_lock
> >   remove_vma()
> >   mmap_write_unlock
> >                                                 process_mrelease:
> >                                                   mmap_read_lock
> >                                                   __oom_reap_task_mm
> >                                                   mmap_read_unlock
> >
> 
> Sure, that sequence (would not call it a race) is possible but in this
> case __oom_reap_task_mm will find no vmas in the mm because exit_mmap
> freed and removed all of them.

I didn't really have chance to have a closer look but I do not see
exit_mmap doing mm->mmap = NULL so the pointer can be a freed vma unless
I am missing something. I thought we've had it in your patches? Has this
got lost somewhere in the process?
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ