Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Warning] This PR is generated by AI
PR Title: Fix for Heap-Buffer-Overflow Vulnerability in
libavc
- OSV-2024-1124PR Description:
libavc
project. The program attempted to access memory outside the allocated heap buffer during bitstream processing. Specifically, the error occurred when trying to read 4 bytes at an invalid offset in theih264d_read_coeff4x4_cabac
function.EXCEED_OFFSET
macro to ensure that the bitstream's offset (u4_ofst
) does not exceed the maximum permissible offset (u4_max_ofst
).ih264d_read_coeff4x4_cabac
function.Sanitizer Report Summary:
The sanitizer detected a heap-buffer-overflow error. The program attempted to read 4 bytes beyond the allocated buffer's boundary of 479223 bytes. The error occurred in the
ih264d_read_coeff4x4_cabac
function and propagated through multiple function calls. The root cause was identified as insufficient bounds checking on the bitstream offset.Full Sanitizer Report:
Files Modified:
decoder/ih264d_parse_cabac.c
Patch Validation: The patch has been validated and confirmed to resolve the issue identified in the sanitizer report. No new bugs were introduced during testing.
Links: