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]
Message-ID: <12642deb-0db3-9210-b468-1872cd3d5409@quicinc.com>
Date:   Sat, 7 Oct 2023 19:34:05 +0800
From:   Kassey Li <quic_yingangl@...cinc.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     <gregkh@...gle.com>, <cmllamas@...gle.com>, <surenb@...gle.com>,
        <arve@...roid.com>, <joel@...lfernandes.org>, <brauner@...nel.org>,
        <tkjos@...roid.com>, <maco@...roid.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] binder: add mutex_lock for mmap and NULL when free



On 2023/10/7 19:18, Greg KH wrote:
> On Sat, Oct 07, 2023 at 07:07:40PM +0800, Kassey Li wrote:
>>
>>
>> On 2023/10/7 14:44, Greg KH wrote:
>>> On Sat, Oct 07, 2023 at 11:40:46AM +0800, Kassey Li wrote:
>>>> Enforce alloc->mutex in binder_alloc_mmap_handler when add
>>>> the entry to list.
>>>>
>>>> Assign the freed pages/page_ptr to NULL to catch possible
>>>> use after free with NULL pointer access.
>>>>
>>>> Signed-off-by: Kassey Li <quic_yingangl@...cinc.com>
>>>> ---
>>>>    drivers/android/binder_alloc.c | 5 ++++-
>>>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> What commit id does this fix?
>>
>>    there is no specific commit id this change going to fix.
>>
>>    it is a follow up for commit
>> 	19c987241ca1216a51118b2bd0185b8bc5081783  binder: separate out binder_alloc
>> functions (mutex lock added for list access in alloc/free)
>> 	f2517eb76f1f2f7f89761f9db2b202e89931738c  android: binder: Add global lru
>> shrinker to binder (set page->page_ptr = NULL;)
>>
>>    the background to raise this change that we are easy hit below crash in
>> monkey test:
>>
>> where a wrong end is passing to
>> binder_update_page_range, thus calculate a weird index
>> for
>>    page = &alloc->pages[index]
> 
> Obviously it is a fix for some commit, please list that here.

  ok, please kindly review this patch description according your 
suggest, i can re-send v2 patch again.

commit 16aaeb8556ff4eb75823c56773ee82b06bac44a0 (HEAD -> master)
Author: Kassey Li <quic_yingangl@...cinc.com>
Date:   Thu Sep 28 10:42:52 2023 +0800

     binder: add mutex_lock for mmap and NULL when free

     -Enforce alloc->mutex in binder_alloc_mmap_handler when add
     the entry to list.

     -Assign the freed pages/page_ptr to NULL to catch possible
     use after free with NULL pointer access.

     Fixes: 19c987241ca1 ("binder: separate out binder_alloc functions")
     Fixes: f2517eb76f1f ("android: binder: Add global lru shrinker to 
binder")
     Signed-off-by: Kassey Li <quic_yingangl@...cinc.com>

> 
> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ