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: <20210603100436.GV31483@twin.jikos.cz>
Date:   Thu, 3 Jun 2021 12:04:37 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Damien Le Moal <Damien.LeMoal@....com>
Cc:     "dsterba@...e.cz" <dsterba@...e.cz>,
        Niklas Cassel <Niklas.Cassel@....com>,
        Jens Axboe <axboe@...nel.dk>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN

On Thu, Jun 03, 2021 at 10:00:08AM +0000, Damien Le Moal wrote:
> On 2021/06/03 18:54, David Sterba wrote:
> > On Mon, May 31, 2021 at 01:54:53PM +0000, Niklas Cassel wrote:
> >> From: Niklas Cassel <niklas.cassel@....com>
> >>
> >> Performing a BLKREPORTZONE operation should be allowed under the same
> >> permissions as read(). (read() does not require CAP_SYS_ADMIN).
> >>
> >> Remove the CAP_SYS_ADMIN requirement, and instead check that the fd was
> >> successfully opened with FMODE_READ. This way BLKREPORTZONE will match
> >> the access control requirement of read().
> > 
> > Does this mean that a process that does not have read nor write access
> > to the device itself (blocks) is capable of reading the zone
> > information? Eg. some monitoring tool.
> 
> With this change, to do a report zones, the process will only need to have read
> access to the device. And if it has read access, it also means that it can read
> the zones content.

Ok, so this is a bit restricting. The zone information is like block
device metadata, comparing it to a file that has permissionx 0600 I can
see the all the stat info (name, tiemstamps) but can't read the data.

But as the ioctl work, it needs a file descriptor and there's probably
no way to separate the permissions to read blocks and just the metadata.
For a monitoring/reporting tool this would be useful. Eg. for btrfs it
could be part of filesystem status overview regarding full or near-full
zones and emitting an early warning or poking some service to start the
reclaim.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ