Skip to content

Commit b7b0c7c

Browse files
terryninitheta682
andauthored
Opening a manipulated RAR archive could lead to remote code execution Security: CVE-2024-26256 Co-authored-by: Timothy Lyanguzov <[email protected]>
1 parent 13e8fc6 commit b7b0c7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libarchive/archive_read_support_format_rar.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,6 +3428,12 @@ run_filters(struct archive_read *a)
34283428
return 0;
34293429
}
34303430

3431+
if (filter->blocklength > VM_MEMORY_SIZE)
3432+
{
3433+
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Bad RAR file data");
3434+
return 0;
3435+
}
3436+
34313437
ret = copy_from_lzss_window(a, filters->vm->memory, start, filter->blocklength);
34323438
if (ret != ARCHIVE_OK)
34333439
return 0;

0 commit comments

Comments
 (0)