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: <4e02ac87-2e00-4399-9f6c-a10ef828592b@infradead.org>
Date: Mon, 22 Jul 2024 13:40:26 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Jonathan Corbet <corbet@....net>, Itay Avraham <itayavr@...dia.com>,
 Jakub Kicinski <kuba@...nel.org>, Leon Romanovsky <leon@...nel.org>,
 linux-doc@...r.kernel.org, linux-rdma@...r.kernel.org,
 netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
 Saeed Mahameed <saeedm@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
 Andy Gospodarek <andrew.gospodarek@...adcom.com>,
 Aron Silverton <aron.silverton@...cle.com>,
 Dan Williams <dan.j.williams@...el.com>, David Ahern <dsahern@...nel.org>,
 Christoph Hellwig <hch@...radead.org>, Jiri Pirko <jiri@...dia.com>,
 Leonid Bloch <lbloch@...dia.com>, Leon Romanovsky <leonro@...dia.com>,
 linux-cxl@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH v2 6/8] fwctl: Add documentation

Hi,

On 7/22/24 9:18 AM, Jason Gunthorpe wrote:
> On Tue, Jun 25, 2024 at 03:04:42PM -0700, Randy Dunlap wrote:
>>> +There are many things this interface must not allow user space to do (without a
>>> +Taint or CAP), broadly derived from the principles of kernel lockdown. Some
>>> +examples:
>>> +
>>> + 1. DMA to/from arbitrary memory, hang the system, run code in the device, or
>>
>> An RPC message is going to run code in the device. Should this say something instead
>> like:
>>
>> download [or load] code to be executed in the device,
> 
> Yeah, it is a hard concept. It is kind of murky as even today's
> devlink flash will let you load untrusted code into the device under
> lockdown AFAICR.
> 
> How about:
> 
>  1. DMA to/from arbitrary memory, hang the system, compromise FW integrity with
>     untrusted code, or otherwise compromise device or system security and
>     integrity.
> 
> Which is a little broader I suppose.

OK, somewhat better.

>>> +The kernel remains the gatekeeper for this interface. If violations of the
>>> +scopes, security or isolation principles are found, we have options to let
>>> +devices fix them with a FW update, push a kernel patch to parse and block RPC
>>
>> fwctl does not do FW updates, is that correct?
> 
> I think it is up to the specific RPCs the device supports. Given there
> is currently no way to marshal a large amount of data it is not a good
> interface for FW update.
> 
> I'd encourage people to use devlink flash more broadly, but I also
> wouldn't go out of the way to block FW update RPCs that might exist
> from here.
> 
> I certainly wouldn't want people to make their own FW update ioctls
> (as still seems to be happening) out of fear they shouldn't use
> fwctl :\

fair enough.

> Looking particularly at mlx5, we've had devlink flash for a long time
> now, but it hasn't suceeded to displace the mlx5 specific tools, for
> whatever reason.
> 
> I grabbed all the changes here thanks!


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ