Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream/master to fork #2

Closed
wants to merge 474 commits into from
Closed

Conversation

sath33sh
Copy link

@sath33sh sath33sh commented Aug 2, 2024

No description provided.

barbibulle and others added 25 commits March 1, 2024 09:44
Use dolby_digital_plus_info for ec-3
Use dolby_digital_plus_info for ec-3
Fuzzer had caught a number of large malloc and these large malloc were caused
by overflow of AP4_UI32 causing the validation logic to be skipped.
Fuzzer caught another large malloc. This is caused by lack of boundary check
resulting in the next atom (children atom) to artificially large "size"
due to the underflow in bytes_available.
Fix overflow issues found by fuzzer
Partially revert track label support for Smooth Streaming
[4916daf]

trackName in server manifest and part of the client manifest StreamIndex URL should match. Also using arbitrary UTF-8 in language_name as part of the URL should be avoided
Fuzzer caught another large malloc. This is caused by lack of boundary check
in Ap4OdheAtom causing underflow.
Earlier boundary checks were insufficient to prevent certain potential
payloads. This adds more boundary checks to prevent underflow of remains. I have
also remove the usage of GetHeaderSize in constructor as it is a virtual method.
Fuzzer caught another large malloc. This is caused by lack of boundary check
in Ap4SbgpAtom causing underflow.
Fuzzer caught another large malloc in Ap4SbgpAtom. It is caused by overflow
in boundary check
The lack of boundary checks in Ap4ContainerAtom leads to an underflow
in size which then leads to existing validation checks to fail and hence allow
large malloc.
Same problem as before, underflow of bytes_available results in some potential
attack
More fixes for issues caught by fuzzer
Fix Smooth Streaming Client Manifest URLs
Fix Level and BitDepth in AV1 Codec String
<script src="shaka-player.uncompiled.js"></script>
<!-- <script src="third_party/closure/goog/base.js"></script> -->
<!-- <script src="dist/deps.js"></script> -->
<script src="//cdnjs.cloudflare.com/ajax/libs/shaka-player/2.0.5/shaka-player.compiled.debug.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
def usage(errMsg):
try:
print 'Error: %s' % (errMsg)
except NameError:

Check notice

Code scanning / CodeQL

Empty except Note

'except' clause does nothing but pass and there is no explanatory comment.
file_lines = open(filename).readlines()
file_out = open(filename, "wb")
file_out = open(filename, "w")

Check warning

Code scanning / CodeQL

File is not always closed Warning

File may not be closed if an exception is raised.
file_lines = open(filename).readlines()
file_out = open(filename, "wb")
file_out = open(filename, "w")

Check warning

Code scanning / CodeQL

File is not always closed Warning

File may not be closed if an exception is raised.

filename = os.path.join(BENTO4_HOME, "Build", "Docker", "Dockerfile")
print("Patching", filename)
file_lines = open(filename).readlines()

Check warning

Code scanning / CodeQL

File is not always closed Warning

File is opened but is not closed.
filename = os.path.join(BENTO4_HOME, "Build", "Docker", "Dockerfile")
print("Patching", filename)
file_lines = open(filename).readlines()
file_out = open(filename, "w")

Check warning

Code scanning / CodeQL

File is not always closed Warning

File is opened but is not closed.

// create the output stream
char fragment_output_filename[MP4_ENCRYPT_MAX_FILENAME_LENGTH + 1];
snprintf(fragment_output_filename, sizeof(fragment_output_filename), output_filename, fragment_input_filename);

Check failure

Code scanning / CodeQL

Non-constant format string Critical

The format string argument to
snprintf
has a source which cannot be verified to originate from a string literal.

// create the output stream
char fragment_output_filename[MP4_ENCRYPT_MAX_FILENAME_LENGTH + 1];
snprintf(fragment_output_filename, sizeof(fragment_output_filename), output_filename, fragment_input_filename);

Check failure

Code scanning / CodeQL

Uncontrolled format string Critical

The value of this argument may come from
a command-line argument
and is being used as a formatting argument to snprintf(__fmt).
The value of this argument may come from
a command-line argument
and is being used as a formatting argument to snprintf(__fmt), which calls __builtin___snprintf_chk((unnamed parameter 4)).
}

AP4_ByteStream* input1 = NULL;
AP4_Result result = AP4_FileByteStream::Create(filename1,

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
}

AP4_ByteStream* input2 = NULL;
result = AP4_FileByteStream::Create(filename2,

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
if (is_uuid) {
// open the payload
AP4_ByteStream* payload = NULL;
AP4_Result result = AP4_FileByteStream::Create(file_path, AP4_FileByteStream::STREAM_MODE_READ, payload);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
} else {
// read the atom to insert
AP4_ByteStream* input = NULL;
AP4_Result result = AP4_FileByteStream::Create(file_path, AP4_FileByteStream::STREAM_MODE_READ, input);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
fprintf(stderr, "ERROR: cannot open input file (%s)\n", input_filename);
return 1;
if (!multi) {
result = AP4_FileByteStream::Create(input_filename, AP4_FileByteStream::STREAM_MODE_READ, input);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
fprintf(stderr, "ERROR: cannot open output file (%s)\n", output_filename);
return 1;
if (!multi) {
result = AP4_FileByteStream::Create(output_filename, AP4_FileByteStream::STREAM_MODE_WRITE, output);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
// create the output stream
char fragment_output_filename[MP4_ENCRYPT_MAX_FILENAME_LENGTH + 1];
snprintf(fragment_output_filename, sizeof(fragment_output_filename), output_filename, fragment_input_filename);
result = AP4_FileByteStream::Create(fragment_output_filename,

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This argument to a file access function is derived from
user input (a command-line argument)
and then passed to AP4_FileByteStream::Create(name), which calls AP4_StdcFileByteStream::Create(name), which calls fopen_s(filename), which calls fopen(__filename).
| CreateProcessor
+---------------------------------------------------------------------*/
static AP4_Processor*
CreateProcessor(enum Method method,

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 103 lines.
@sath33sh sath33sh changed the title Sycn upstream/master to fork Sync upstream/master to fork Aug 2, 2024
@sath33sh sath33sh closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.