mvcdec: Heap overflow in 'ih264d_read_coeff4x4_cabac'

In some erroneous fuzzer bistreams, the slice data requires more
parsing than what was implied by the distance between successive
start codes. The primary culprit is the NEXTBITS macro which requires
reading 4 additional bytes of the bitstream buffer. To alleviate
this, 4 bytes per 4x4 TU have been additionally allocated to the
bitstream buffer.

Bug = ossfuzz:66989
Test: mvc_dec_fuzzer
1 file changed
tree: 00ceab08f604b516784e7064830d4bb90322c34f
  1. .github/
  2. cmake/
  3. common/
  4. decoder/
  5. encoder/
  6. examples/
  7. fuzzer/
  8. tests/
  9. .clang-format
  10. .gitignore
  11. Android.bp
  12. CMakeLists.txt
  13. FrameInfo.md
  14. libavc_blocklist.txt
  15. LICENSE
  16. METADATA
  17. MODULE_LICENSE_APACHE2
  18. NOTICE
  19. OWNERS
  20. PREUPLOAD.cfg
  21. README.md
  22. TEST_MAPPING
README.md

LIBAVC

Getting Started Document

LibAVC build steps

Supports:

  • aarch32/aarch64 on Linux.
  • aarch32/aarch64 on Android.
  • x86_32/x86_64 on Linux.

Native Builds

Use the following commands for building on the target machine

$ cd external/libavc
$ mkdir build
$ cd build
$ cmake ..
$ make

Cross-compiler based builds

Building for x86_32 on a x86_64 Linux machine

$ cd external/libavc
$ mkdir build
$ cd build
$ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake ..
$ make

Building for aarch32/aarch64

Update 'CMAKE_C_COMPILER', 'CMAKE_CXX_COMPILER', 'CMAKE_C_COMPILER_AR', and 'CMAKE_CXX_COMPILER_AR' in CMAKE_TOOLCHAIN_FILE passed below

$ cd external/libavc
$ mkdir build
$ cd build

For aarch64

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake
$ make

For aarch32

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
$ make