We found a loophole in the program. The crash occurred on line 90 of the AP4_SgpdAtom function in the Ap4SgpdAtom.cpp file. A loop was executed within the function, but due to an unknown error, the entry_count variable controlling the rotation of the loop overflowed to 2147483649 (231 + 1). The loop continues, resulting in insufficient memory and the program was killed by the system kernel, resulting in a crash. We think the cause of the dead loop: entry_count is initialized on line 89, and the function that caused the exception to this variable is stream.ReadUI32(entry_count) on line 90. The call to this function causes the entry_count variable to become a very large value, causing an endless loop to occur.
Found a vulnerability in the program（Maybe？）
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : Found a vulnerability in the program（Maybe？）
Issue date:

--- start body ---
We found a loophole in the program. The crash occurred on line 90 of the AP4_SgpdAtom function in the Ap4SgpdAtom.cpp file. A loop was executed within the function, but due to an unknown error, the entry_count variable controlling the rotation of the loop overflowed to 2147483649 (231 + 1). The loop continues, resulting in insufficient memory and the program was killed by the system kernel, resulting in a crash. We think the cause of the dead loop: entry_count is initialized on line 89, and the function that caused the exception to this variable is stream.ReadUI32(entry_count) on line 90. The call to this function causes the entry_count variable to become a very large value, causing an endless loop to occur.
--- end body ---

A potential vulnerability in the AP4_SgpdAtom function of Bento4 could lead to a Denial of Service (DoS) due to an integer overflow in the entry_count variable. This overflow can cause an infinite loop, leading to excessive memory consumption and eventual crash of the program.