Bug 698886 - oss-fuzz 5501: Assert triggered in pdf_store
Summary: oss-fuzz 5501: Assert triggered in pdf_store
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Linux
: P4 normal
Assignee: Sebastian Rasmussen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 06:26 UTC by Sebastian Rasmussen
Modified: 2019-05-08 13:59 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Minimized PDF from oss-fuzz. (1.46 KB, application/pdf)
2018-01-22 06:26 UTC, Sebastian Rasmussen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Rasmussen 2018-01-22 06:26:13 UTC
Created attachment 14617 [details]
Minimized PDF from oss-fuzz.

Running

build/sanitize/mutool draw -s t ./oss-fuzz-5501.pdf

causes

error: cannot recognize xref format
warning: trying to repair broken xref
warning: repairing PDF document
error: invalid key in dict
warning: invalid indirect reference in dict
warning: object missing 'endobj' token
warning: lexical error (unexpected '>')
error: invalid key in dict
error: invalid key in dict
warning: ignoring broken object (7 0 R)
warning: invalid indirect reference in dict
warning: lexical error (unexpected '>')
error: invalid key in dict
warning: ignoring broken object (21 0 R)
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
error: invalid key in dict
warning: cannot load object (7 0 R) into cache
mutool: source/pdf/pdf-store.c:61: pdf_store_item: Assertion `pdf_is_name(ctx, key) || pdf_is_array(ctx, key) || pdf_is_dict(ctx, key) || pdf_is_indirect(ctx, key)' failed.
Aborted
Comment 1 Sebastian Rasmussen 2018-01-22 18:26:51 UTC
A tentative fix for this issue is in commit e90443e47298401052b7534868ca59d43c00a228.
Comment 2 Sebastian Rasmussen 2018-02-01 09:19:53 UTC
The tentative fix was redone and the final commit that fixes the issue is

commit 8a3257b01faa899dd9b5e35c6bb3403cd709c371
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Wed Jan 24 14:05:09 2018 +0100

    Fix 698886: Don't try to load non-stream XObjects.