Re: [syzbot] WARNING in mntput_no_expire (2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 04, 2021 at 04:44:06PM +0000, Al Viro wrote:
> On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote:
> 
> > > Very interesting.  What happens if you call loop() twice?  And now I wonder
> > > whether it's root or cwd, actually...  Hmm...
> > > 
> > > How about this:
> > > 	fd = open("/proc/self/mountinfo", 0);
> > > 	mkdir("./newroot/foo", 0777);
> > > 	mount("./newroot/foo", "./newroot/foo", 0, MS_BIND, NULL);
> > > 	chroot("./newroot");
> > > 	chdir("/foo");
> > > 	while (1) {
> > > 		static char buf[4096];
> > > 		int n = read(fd, buf, 4096);
> > > 		if (n <= 0)
> > > 			break;
> > > 		write(1, buf, n);
> > > 	}
> > > 	close(fd);
> > > 	drop_caps();
> > > 	loop();
> > > as the end of namespace_sandbox_proc(), instead of
> > > 	chroot("./newroot");
> > > 	chdir("/");
> > > 	drop_caps();
> > > 	loop();
> > > sequence we have there?
> > 
> > Uhum, well then we oops properly with a null-deref.
> 
> Cute...  Could you dump namei.o (ideally - with namei.s) from your build
> someplace public?

Yeah, I have at least namei.o

https://drive.google.com/file/d/1AvO1St0YltIrA86DXjp1Xg3ojtS9owGh/view?usp=sharing

Christian



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux