[roll] Roll fuchsia [bt][core] lenient LEGetVendorCapabilitiesCommandComplete parsing

LEGetVendorCapabilitiesCommandComplete is an Android vendor extensions
command defining various vendor capabilities a Controller
supports. There can be various versions of this command complete event
sent by the Controller. As fields are added, the version_supported field
is incremented to signify which fields are available. As currently
defined, LEGetVendorCapabilitiesCommandComplete has fields defined up to
version 1.03. However, such a definition also locks us into only being
able to receive version 1.03+. Older Controllers may respond with a
lower version, with fewer fields, and a smaller payload. When we receive
such a response, although valid, we crash because there aren't enough
bytes for the structure we expect.

In a previous undertaking (pwrev.dev/203950, fxrev.dev/1029396), we
attempted to use Emboss' conditional fields feature to define fields
based on the version they are included in. However, in practice, we've
found vendors sometimes send the wrong number of bytes required for the
version they claim to send.

This change updates the LEGetVendorCapabilitiesCommandComplete parsing
to be more lenient. To tolerate these types of errors, we simply define
all the fields in Emboss. If we receive a response smaller than what we
expect, we use what the vendor sends, and fill the rest with zero to
disable the feature. If we receive a response larger than what we
expect, we read up to what we support and drop the rest of the data.

Original-Bug: b/332924521
Original-Bug: b/332924195
Test: fx test //src/connectivity/bluetooth/core/bt-host
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1030253
Original-Revision: 6e3ccf841de558fb8b771eff3bd0707e6d0d7686
GitOrigin-RevId: d19efe0d7e815d74ad779be614d96d15f6464703
Change-Id: I2b482266d088c18bfe4f00a48a61e372c2798b3f
1 file changed
tree: df1a30b25ddbb5fb7d24280d38080de60fdee6bd
  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.