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: <20111217232053.GD3313@swordfish>
Date:	Sun, 18 Dec 2011 02:20:53 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Jens Axboe <axboe@...nel.dk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kay Sievers <kay.sievers@...y.org>,
	Namhyung Kim <namhyung@...il.com>,
	Lukas Czerner <lczerner@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] loop: fput() called in loop_clr_fd() may cause bd_mutex
 recursive locking

On (12/17/11 22:58), Al Viro wrote:
> On Sun, Dec 18, 2011 at 01:37:45AM +0300, Sergey Senozhatsky wrote:
> > > Think of it for a minute - if we could run into the
> > > same bdev in that recursion, what would have happened on read() from
> > > that sucker? So yes, it is a false positive. 
> > 
> > I've tried read()/write() some time ago and it worked. Perhaps, I just
> > wasn't "lucky" enough to hit any problems.
> 
> Sure - exactly because of that loop prevention logics.  *If* we really
> had been able to set a loop0 -> loop1 -> loop2 -> loop0 or something of
> that sort, this warning wouldn't be a false positive.  But on any
> such setup, where would IO attempts end up doing?  

Thanks for your explanations.

> IOW, we have to prevent such setups anyway and not just because of
> problems on close() - they would be deadly on read() and write()...
> 

Preventing recursion in the first place? For example, in lo_open()?


	Sergey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ