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:   Mon, 19 Mar 2018 15:16:51 -0700
From:   "Joel Fernandes (Google)" <joel.opensrc@...il.com>
To:     Yisheng Xie <xieyisheng1@...wei.com>
Cc:     gregkh@...uxfoundation.org, ben@...adent.org.uk, arve@...roid.com,
        syzbot+d7a918a7a8e1c952bc36@...kaller.appspotmail.com,
        devel@...verdev.osuosl.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: android: ashmem: Fix possible deadlock in ashmem_ioctl

On Tue, Feb 27, 2018 at 10:59 PM, Yisheng Xie <xieyisheng1@...wei.com> wrote:
> ashmem_mutex may create a chain of dependencies like:
>
> CPU0                                    CPU1
>  mmap syscall                           ioctl syscall
>  -> mmap_sem (acquired)                 -> ashmem_ioctl
>  -> ashmem_mmap                            -> ashmem_mutex (acquired)
>     -> ashmem_mutex (try to acquire)       -> copy_from_user
>                                               -> mmap_sem (try to acquire)
>
> There is a lock odering problem between mmap_sem and ashmem_mutex causing
> a lockdep splat[1] during a syzcaller test. This patch fixes the problem
> by move copy_from_user out of ashmem_mutex.
>
> [1] https://www.spinics.net/lists/kernel/msg2733200.html
>
> Fixes: ce8a3a9e76d0 (staging: android: ashmem: Fix a race condition in pin ioctls)
> Reported-by: syzbot+d7a918a7a8e1c952bc36@...kaller.appspotmail.com
> Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>

Greg,
Could you take this patch for the stable trees? I do see it in staging
already. I couldn't find it in stable so wanted to bring it to your
attention. If you already aware of it, please ignore my note.

Thanks,
- Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ