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

Malformed PDF causes hang with 100% CPU usage #450

Open
bcoles opened this issue Apr 17, 2022 · 0 comments
Open

Malformed PDF causes hang with 100% CPU usage #450

bcoles opened this issue Apr 17, 2022 · 0 comments

Comments

@bcoles
Copy link
Contributor

bcoles commented Apr 17, 2022

pdf-reader hangs with 100% CPU usage when parsing the attached corrupt/malformed PDFs.

$ grep -rn 'execution expired' crashes/*.trace -A 1
crashes/20220417003806867869681_crash_493.pdf.trace:1:execution expired
crashes/20220417003806867869681_crash_493.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:369:in `==='
--
crashes/20220417003946304391404_crash_46.pdf.trace:1:execution expired
crashes/20220417003946304391404_crash_46.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:212:in `last'
--
crashes/20220417004158417521645_crash_436.pdf.trace:1:execution expired
crashes/20220417004158417521645_crash_436.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:214:in `==='
--
crashes/20220417004215740850757_crash_860.pdf.trace:1:execution expired
crashes/20220417004215740850757_crash_860.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:363:in `initialize_copy'
--
crashes/20220417004806777986832_crash_556.pdf.trace:1:execution expired
crashes/20220417004806777986832_crash_556.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/xref.rb:132:in `=='
--
crashes/20220417004856762678629_crash_765.pdf.trace:1:execution expired
crashes/20220417004856762678629_crash_765.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:363:in `initialize_copy'
--
crashes/20220417005354910820796_crash_537.pdf.trace:1:execution expired
crashes/20220417005354910820796_crash_537.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:370:in `block in prepare_regular_token'
--
crashes/20220417005432127478378_crash_442.pdf.trace:1:execution expired
crashes/20220417005432127478378_crash_442.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:363:in `initialize_copy'
--
crashes/20220417005536795564792_crash_177.pdf.trace:1:execution expired
crashes/20220417005536795564792_crash_177.pdf.trace-2-/var/lib/gems/2.7.0/gems/pdf-reader-2.9.2/lib/pdf/reader/buffer.rb:212:in `last'

20220417004158417521645_crash_436.pdf
20220417004806777986832_crash_556.pdf
20220417004856762678629_crash_765.pdf
20220417005354910820796_crash_537.pdf
20220417005432127478378_crash_442.pdf
20220417005536795564792_crash_177.pdf
20220417003806867869681_crash_493.pdf
20220417003946304391404_crash_46.pdf
20220417004215740850757_crash_860.pdf

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

No branches or pull requests

1 participant