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: <IA0PR11MB718599AAE80C72AE0F19EF0FF8AE2@IA0PR11MB7185.namprd11.prod.outlook.com>
Date: Sat, 20 Jul 2024 06:30:52 +0000
From: "Kasireddy, Vivek" <vivek.kasireddy@...el.com>
To: Hillf Danton <hdanton@...a.com>, David Hildenbrand <david@...hat.com>
CC: syzbot <syzbot+ec4b7d82bb051330f15a@...kaller.appspotmail.com>,
	"hughd@...gle.com" <hughd@...gle.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"syzkaller-bugs@...glegroups.com" <syzkaller-bugs@...glegroups.com>, "Matthew
 Wilcox" <willy@...radead.org>
Subject: RE: [syzbot] [mm?] BUG: Bad page map (8)

Hi Hillf, David,

> 
> On Fri, 19 Jul 2024 13:21:30 +0200 David Hildenbrand <david@...hat.com>
> > On 19.07.24 00:51, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following issue on:
> > >
> > > HEAD commit:    4d145e3f830b Merge tag 'i2c-for-6.10-rc8' of git://git.ker..
> > > git tree:       upstream
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=11321495980000
> > > kernel config:  https://syzkaller.appspot.com/x/.config?x=6b5a15443200e31
> > > dashboard link:
> https://syzkaller.appspot.com/bug?extid=ec4b7d82bb051330f15a
> > > compiler:       aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU
> Binutils for Debian) 2.40
> > > userspace arch: arm64
> > > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=113e054e980000
> > > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1366ab85980000
> > >
> >
> > The reproducer involves udmabuf. I suspect it has to do with it.
> >
> > But I'm curius, does the reproducer not trigger before 4d145e3f830b on
> > mainliny?
> >
> > Viveks changes are not upstream yet, but I can only speculate that we
> > have some issue similar to the one we had with hugetlb: udmabuf doing
> > things with memfd/shmem pages that it shouldn't do, because it doesn't
> > "own" these pages.
> >
> > "udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap" might
> help.
Thank you for taking a look. The above patch or other associated patches may be
fixing this bug as I cannot reproduce this issue with a few weeks old mm-unstable.

> 
> 	cpu1				cpu2
> 	---				---
> 	evict()				find folio2 in page cache
> 	truncate_inode_folio()
> 	truncate_cleanup_folio();
> 	  // unmap folio2 from mmA
> 	  unmap_mapping_folio(folio2);
> 					mmap folio2 to mmB
> 	filemap_remove_folio(folio2);
> 
> 
> If the window exists for mapping folio to userspace while indoe is evicted,
> is this report false positive?
Yeah, this situation is possible as udmabuf currently does not handle truncation
or hole punch of the memfd after a dmabuf is created. I have tried addressing this
issue some time ago but the solution was not elegant. Need to revisit this when
time permits.

Thanks,
Vivek





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ