Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.Test your applications
- Snyk ID SNYK-COCOAPODS-GPAC4IOS-1567332
- published 19 Aug 2021
- disclosed 19 Aug 2021
- credit Cisco Talos
How to fix?
There is no fixed version for
GPAC4iOS is a GPAC4iOS is the libgpac library packaged for iOS as a Pod. It is preconfigured and tested to do a single task: create a MP4 file from a raw H.264 and an audio track.
Affected versions of this package are vulnerable to Heap-based Buffer Overflow. When processing an atom with the
stsc FOURCC code, the library will use the following function. This function will read the atom and extract the information required to produce the samples for the input video. At line 46, the library will read the number of sample entries from the atom, and then check it against the 64-bit atom size. Due to the atom size being 64-bits, this check is insufficient. Afterwards at line 48, the function will take the number of entries and multiply it by the size of the
GF_StscEntry structure. Due to an integer overflow, the product of this calculation can result in the allocation for the space of the array to be smaller than required for reading each entry of the atom. Later at line 49, when the function reads entries into each element of this undersized array, the loop will write outside its bounds. This will result in a heap-based buffer overflow.