Integer Overflow Affecting gpac4ios package, versions >=0.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.35% (72nd percentile)

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 Learn

Learn about Integer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-COCOAPODS-GPAC4IOS-1567330
  • published19 Aug 2021
  • disclosed19 Aug 2021
  • creditCisco Talos

Introduced: 19 Aug 2021

CVE-2021-21839  (opens in a new tab)
CWE-400  (opens in a new tab)

How to fix?

There is no fixed version for GPAC4iOS.

Overview

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 Integer Overflow. The following function is used by the library to parse atoms identified by the pcrb FOURCC code. The library will read a u32 from the input and store it as the number of sub-segments. This number will be multiplied by the size of a u64 which can result in an integer overflow. Due to the integer overflow, this can result in an undersized allocation being made. Later at line 30, the library will begin to read integers from the input and then combine them when writing them into the buffer that was allocated. Due to the buffer being undersized, the assignment to the “pcr_values” field will write outside the bounds of the buffer. This is a heap-based buffer overflow and will result in memory corruption.

CVSS Scores

version 3.1