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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220506083523.drdj2ahjw6abimus@quack3.lan>
Date:   Fri, 6 May 2022 10:35:23 +0200
From:   Jan Kara <jack@...e.cz>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Jan Kara <jack@...e.cz>, Richard Guy Briggs <rgb@...hat.com>,
        Paul Moore <paul@...l-moore.com>,
        Linux-Audit Mailing List <linux-audit@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Eric Paris <eparis@...isplace.org>,
        Steve Grubb <sgrubb@...hat.com>
Subject: Re: [PATCH v2 2/3] fanotify: define struct members to hold response
 decision context

On Thu 05-05-22 20:34:06, Amir Goldstein wrote:
> > One open question I have is what should the kernel do with 'info_type' in
> > response it does not understand (in the future when there are possibly more
> > different info types). It could just skip it because this should be just
> > additional info for introspection (the only mandatory part is in
> > fanotify_response, however it could surprise userspace that passed info is
> > just getting ignored. To solve this we would have to somewhere report
> > supported info types (maybe in fanotify fdinfo in proc). I guess we'll
> > cross that bridge when we get to it.
> >
> > Amir, what do you think?
> 
> Regardless if and how we provide a way to enumerate supported info types,
> I would prefer to reject (EINVAL) unknown info types.

OK, agreed. I will be also calmer when we do that because then we can be
certain userspace does not pass bogus data for unknown info types.

> We can provide a command FAN_RESPONSE_TEST to write a test response with
> FAN_NOFD and some extra info so the program can test if certain info
> types are supported.

Hum, that would be an option as well. We don't even need the
FAN_RESPONSE_TEST command, do we? The write to fanotify fd for FAN_NOFD fd
would just perform validation of the response and either accept it (do
nothing) or return EINVAL.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ