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: <20211008182938.0dea0600@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 8 Oct 2021 18:29:38 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     "Keller, Jacob E" <jacob.e.keller@...el.com>
Cc:     Jiri Pirko <jiri@...nulli.us>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [net-next 0/4] devlink: add dry run support for flash update

On Sat, 9 Oct 2021 00:32:49 +0000 Keller, Jacob E wrote:
> Ah.. I see how its done. It's passed as the argument so you  don't
> see a direct comparison which makes it look like there isn't one...
> Feels like there could probably be a better abstraction that was more
> readable here...
> 
> Anyways. I'll confirm what happens on the kernel that doesn't have
> the attribute defined at all.
> 
> I wonder if the thing I saw differently was because the attribute
> *was* known but wasn't in policy. I.e. because it was defined it was
> validated....
> 
> Yep, I confirm that on a kernel without the DRY_RUN flag that it
> would allow the run because we aren't being strict.
> 
> I am guessing that we can't convert devlink over to strict validation?

I think the current best practice is not to opt-in commands which
started out as non-strict into strict validation. That said opting 
it in for MAXTYPE validation seems reasonable to me.

Alternatively, as I said, you can just check the max attr for the
family in user space. CTRL_CMD_GETFAMILY returns it as part of family
info (CTRL_ATTR_MAXATTR). We can make user space do the rejecting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ