UPSTREAM: libmbim-glib,tlv: ensure TLV header is aligned when reading it

Due to 32 bit alignment not being enforced in the MBIMEx messages, we
cannot blindly cast the start of a struct tlv to any point in a
bytearray. We use an intermediate variable to ensure alignment when
processing its contents.

(cherry picked from commit 93ba75ba5e443c12c9b5231727c6e9e0eda89817)

BUG=b:310186023
TEST=Fuzzer test passes

Change-Id: I90b7bbd3164c2c26203bed3986c815827e934411
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/libmbim/+/5028326
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Aleksander Morgado <aleksandermj@google.com>
Commit-Queue: Aleksander Morgado <aleksandermj@google.com>
1 file changed
tree: 0a5528a555eb7c6c0c43b0117f2fe32a5ab17fc5
  1. build-aux/
  2. data/
  3. docs/
  4. examples/
  5. LICENSES/
  6. src/
  7. utils/
  8. .gitignore
  9. .gitlab-ci.yml
  10. AUTHORS
  11. DIR_METADATA
  12. meson.build
  13. meson_options.txt
  14. NEWS
  15. OWNERS
  16. PRESUBMIT.cfg
  17. README.chromium
  18. README.md
  19. RELEASING
  20. unblocked_terms.txt
README.md

libmbim

libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Broadband Interface Model (MBIM) protocol.

Documentation

Project documentation is kept in: https://modemmanager.org/docs/libmbim/

License

  • libmbim-glib library is released under the LGPL-2.1-or-later license.
  • mbimcli and mbim-network tools are released under the GPL-2.0-or-later license.

License texts can be found under the LICENSES folder.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms, which you can find in the following link: https://www.freedesktop.org/wiki/CodeOfConduct CoC issues may be raised to the project maintainers at the following address: libmbim-devel-owner@lists.freedesktop.org