From: Vernon Mauery <vernon.mauery@linux.intel.com>
To: Jeremy Kerr <jk@ozlabs.org>
Cc: Ed Tanous <ed.tanous@intel.com>, openbmc@lists.ozlabs.org
Subject: Re: In-Band Firmware Update
Date: Wed, 8 Aug 2018 14:42:31 -0700 [thread overview]
Message-ID: <20180808214231.GB33167@mauery.jf.intel.com> (raw)
In-Reply-To: <8b3e02f3-92fc-678d-c580-18c76ee3692c@ozlabs.org>
On 08-Aug-2018 09:32 AM, Jeremy Kerr wrote:
>Hi Ed,
>
>>>We are going to investigate using the DFU protocol, as that
>>>also has host side tools already available.
>>
>>DFU doesn't completely solve the issue though, does it? Presumably
>>for security reasons you can't have the DFU device exposed to the
>>host all the time. If you did, I'm sure the penetration testers
>>would hit it hard. Assuming that leaving it available all the time
>>is a non-starter, don't you need some command to activate the
>>interface to allow the upload?
>
>Yes, we'd have an endpoint exposed all the time (the run-time descriptor
>set). This changes into the DFU mode descriptor set at the start of the
>upgrade process, when the host-side tools issue a DFU_DETACH.
>
>Does hiding the descriptor get us anything, if it can be enabled from
>the host anyway? The run-time descriptor is super simple.
I am not saying security by obscurity is good, but there is a difference
between an unlocked door and an open one. I am sure our security team
would not want the firmware update descriptor present at all times.
>>Assuming I'm not missing something there (I probably am) doesn't it
>>make more sense to just expose a USB mass storage device when the
>>"start" command is sent, as opposed to implementing the full DFU
>>protocol? It seems like that would require no utilities (aside from
>>a simple nsh/bash script) and be very easy to replicate.
>
>Just that this requires more custom stuff host-side; raw IPMI commands
>for the start and stop (unless we can hook into a SCSI eject event for
>the stop perhaps). If we can use existing tools that already support
>DFU, that's less stuff that needs to be provided on the host side.
>
>That said, it does look like the current DFU spec isn't going to allow
>fast enough transfers for a BMC firmware image in reasonable times, so
>we may have to modify those *anyway*, so most of the benefit there may
>be lost...
Speed is a big thing. With firmware image sizes as big as they are, we
cannot afford slow transfers.
>A USB-mass-storage-based solution could be okay, as long as we have a
>solid specification for what gets written to the device (a filesystem
>containing the image? raw image on the device?), secure parsing for that
>data (particularly if the BMC is reading a filesystem) and a protocol
>between BMC and host so that we can implement proper handover. If we can
>use standard tools for that, it might be a good way to go.
If the BMC exports an empty FAT filesystem, just about anything can read
that. It is easy to parse on the inbound and can easily be done with a
loop-mount. In this case though, it would be nice to have some sort of
control that tells the BMC when to "plug in" and "eject" the device
to/from the host for synchronization mechanisms. The BMC could then look
at the volume and attempt to use each file as a firmware volume to
prepare for activation.
--Vernon
prev parent reply other threads:[~2018-08-08 21:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 18:13 In-Band Firmware Update Patrick Venture
2018-07-23 22:18 ` Vernon Mauery
2018-07-24 0:13 ` Sai Dasari
2018-07-24 19:02 ` Bakshi, Sachit
2018-07-24 20:38 ` Matt Spinler
2018-07-27 19:01 ` Patrick Venture
2018-08-06 16:51 ` Patrick Venture
2018-08-06 17:26 ` Patrick Venture
2018-08-06 18:36 ` Patrick Venture
2018-08-06 22:20 ` Ed Tanous
2018-08-06 23:04 ` Andrew Jeffery
2018-08-07 15:14 ` Patrick Venture
2018-08-07 16:41 ` Patrick Venture
2018-08-07 18:48 ` Patrick Venture
2018-08-07 15:11 ` Patrick Venture
2018-08-06 21:59 ` Ed Tanous
2018-08-08 1:32 ` Jeremy Kerr
2018-08-08 21:42 ` Vernon Mauery [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180808214231.GB33167@mauery.jf.intel.com \
--to=vernon.mauery@linux.intel.com \
--cc=ed.tanous@intel.com \
--cc=jk@ozlabs.org \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.