[roll] Roll fuchsia [system-updater] Verify and set the image fuchsia.mem.Buffer size

The fuchsia.mem.Buffers returned by
fuchsia.paver.DataSink.Read[Asset|Firmware] have their own size field,
in addition to the size and content size properties associated with
their vmo.
For ReadAsset, this size field will either be the size of just the
image or the size of the entire partition. For ReadFirmware the size
field is the size of the entire partition.

system-updater was ignoring this field and reading as many bytes as
the vmo would allow. system-updater now respects this field and will
not read past it.

system-updater was also not setting this field when passing the
Buffer back to fuchsia.paver.DataSink.Write[Asset|Firmware].
system-updater now sets the field to the size indicated by the
manifest in the update package.

The combination of these two bugs meant that the paver could return
a vmo with all N correct bytes, but a Buffer size field of e.g. N-1.
system-updater would validate that the Buffer contained the correct
contents and then pass it back to Write[Asset|Firmware] to copy the
image to the other configuration, but the paver *would* respect the
Buffer size field and zero the last byte, resulting in an incorrect
image. With the fixes in this commit this should no longer be
possible.

Original-Fixed: 329335317, 329321516
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1010302
Original-Revision: 2e70675fb14eb742063d039f40c8e274ec928816
GitOrigin-RevId: a990ec85ccc018b03baab4b33ca83852feeb95e3
Change-Id: I0f7609711db96163dc8cd8c28c75794005d65584
1 file changed
tree: f134aa602ff7bfe3eaddf4e321026d4fc446f5e6
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.