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] [day] [month] [year] [list]
Date:   Thu, 7 Jul 2022 20:04:04 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Liu Shixin <liushixin2@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jan Kara <jack@...e.cz>,
        William Kucharski <william.kucharski@...cle.com>,
        Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH 5.15 v4] mm/filemap: fix UAF in find_lock_entries

On Thu, Jul 07, 2022 at 04:09:29AM +0100, Matthew Wilcox wrote:
> On Thu, Jul 07, 2022 at 10:09:38AM +0800, Liu Shixin wrote:
> > Release refcount after xas_set to fix UAF which may cause panic like this:
> > 
> >  page:ffffea000491fa40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x1247e9
> >  head:ffffea000491fa00 order:3 compound_mapcount:0 compound_pincount:0
> >  memcg:ffff888104f91091
> >  flags: 0x2fffff80010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff)
> > ...
> > page dumped because: VM_BUG_ON_PAGE(PageTail(page))
> >  ------------[ cut here ]------------
> >  kernel BUG at include/linux/page-flags.h:632!
> >  invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
> >  CPU: 1 PID: 7642 Comm: sh Not tainted 5.15.51-dirty #26
> > ...
> >  Call Trace:
> >   <TASK>
> >   __invalidate_mapping_pages+0xe7/0x540
> >   drop_pagecache_sb+0x159/0x320
> >   iterate_supers+0x120/0x240
> >   drop_caches_sysctl_handler+0xaa/0xe0
> >   proc_sys_call_handler+0x2b4/0x480
> >   new_sync_write+0x3d6/0x5c0
> >   vfs_write+0x446/0x7a0
> >   ksys_write+0x105/0x210
> >   do_syscall_64+0x35/0x80
> >   entry_SYSCALL_64_after_hwframe+0x44/0xae
> >  RIP: 0033:0x7f52b5733130
> > ...
> > 
> > This problem has been fixed on mainline by patch 6b24ca4a1a8d ("mm: Use
> > multi-index entries in the page cache") since it deletes the related code.
> > 
> > Fixes: 5c211ba29deb ("mm: add and use find_lock_entries")
> > Signed-off-by: Liu Shixin <liushixin2@...wei.com>
> 
> Acked-by: Matthew Wilcox (Oracle) <willy@...radead.org>

Now queued up, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ