V4L2DecodeComponent: Limit the resolution of the output buffers

Malicious video playback might set extremely large resolution during
decoding, to exhaust the system memory.

In this CL, V4L2DecodeComponent checks if the resolution of the output
buffers are larger than the maximum supported size 4096x4096. If so,
V4L2DecodeComponent will notify the Codec2 framework that error occurs
and exit gracefully.

Bug: 157113946
Test: pass tast.arc.VideoDecodeAccel.h264_vm
Change-Id: I94a5223d7d3d734ffca06064cf375944e28f68b1
1 file changed
tree: 5f105ef36d1fb0a400ea9d887f6aa43be1ce00b5
  1. accel/
  2. common/
  3. components/
  4. plugin_store/
  5. service/
  6. store/
  7. tests/
  8. .clang-format
  9. MODULE_LICENSE_BSD
  10. NOTICE
  11. OWNERS
  12. PREUPLOAD.cfg
  13. README.md
README.md

V4L2-based Codec2 Component Implementation

Description of Sub-folders

  • accel/ Core V4L2 API and codec utilities, ported from Chromium project.

  • common/ Common helper classes for both components/ and store/.

  • components/ The C2Component implementations based on V4L2 API.

  • store/ The implementation of C2ComponentStore. It is used for creating all the C2Components implemented at components/ folder.

  • service/ The Codec2's V4L2 IComponentStore service. The service initiates the component store implemented at store/ folder, and registers it as the default service.