Commit Graph

290 Commits (9f407d83b3dd2f18b2ffb764da71ccd992f16872)

Author SHA1 Message Date
Micah Snyder (micasnyd) 7a70a03ba0 fuzz-29454: fix buffer overread in PDF parser 4 years ago
Micah Snyder (micasnyd) b9ca6ea103 Update copyright dates for 2021 4 years ago
Micah Snyder (micasnyd) 205d8dcd6e fuzz-24408: Fix NULL-deref bug in PDF parser 5 years ago
Micah Snyder e2f59af30a Clang-format touchup 5 years ago
Clement Lecigne 4c96f017f9 pdf: do not override pdf->fileIDlen if there is no new fileID. 5 years ago
Andrew 319bfb51a5 Fix several coverity warnings 5 years ago
Micah Snyder (micasnyd) cdbc833a32 PDF: Delay Javascript detection until JS found 5 years ago
Micah Snyder 11ef77007b Improve tmp sub-directory names 5 years ago
Micah Snyder 9b9999d778 Rename core scanning functions 5 years ago
Micah Snyder 005cbf5a37 Record names of extracted files 5 years ago
Mickey Sola 706dd7d7bc pdf - fixup Aldo's PR based on review by team 5 years ago
Aldo Mazzeo 7d2ce0b32c Adding support for Adobe Reader X encryption scheme 5 years ago
Micah Snyder (micasnyd) 4b7a738152 fuzz-21329: Fix out-of-bounds read in PDF parser 5 years ago
Jonas Zaddach (jzaddach) d5a733ef90 XLM (Excel 4.0) macro detection and extraction 5 years ago
Mickey Sola 5d411c68fb bb12461 - error out properly when pdf parser fails to allocate a map; normalize/sanitize user supplied filename and comment info when parsing arj headers; add better bound checking and error handling to arj header parsers 5 years ago
Micah Snyder 898c08f08b Formatting touch-up 5 years ago
Micah Snyder 206dbaefe8 Update copyright dates for 2020 5 years ago
Micah Snyder 88ce6b8170 Fix to dereference pdf pointer after NULL check, not before. 6 years ago
Micah Snyder 4524c398f3 Argument and return types for fmap_readn(), cli_writen(), cli_readn() converted to use size_t instead of int. 6 years ago
Micah Snyder ca8b4c466e Assortment of warning fixes. 6 years ago
Micah Snyder (micasnyd) 88d271cbf5 Added pdf max object checks to limit max # of objects but continue scanning those that have already been found. 6 years ago
Micah Snyder df52009b40 pdf.c formatting fixes. 6 years ago
Clement Lecigne 3e77daa791 pdf: fix octal conversion in pdf_readstring. 6 years ago
Clement Lecigne e2b774d791 pdf: handle dictionary object with newlines. 6 years ago
Micah Snyder a8ca96687a Clean up of PDF object finding logic. Changes include recording object sizes as objects are found, identifying object streams in the object parsing section instead of the PDF parsing section, and limiting of stream and other object parsing to the size of the object instead of the size of the PDF. It is also easier to read and includes more inline documentation. 6 years ago
Micah Snyder 25d72538cd fuzz - 12181 - Fixed 1-byte buffer over-read in PDF parser. 6 years ago
Micah Snyder 1e50361baf fuzz - 12168 - Fix for 1 byte out of bounds read in PDF parser. Fix includes a check to ensure that it is safe to index -1 from the start of an object a well as additional checks to invalidate some negative integer values. 6 years ago
Micah Snyder da15bcfd37 fuzz - 12149 - Fix for out of bounds read in PDF object stream parsing code. 6 years ago
Micah Snyder 479a9a235a Fixes for issues identified by coverity. 6 years ago
Micah Snyder da8d941cc8 fuzz - 12131, 12132, 12205 - Speed up PDF parse speed for truncated (or otherwise malformed) PDFs. 6 years ago
Micah Snyder 52cddcbcfd Updating and cleaning up copyright notices. 6 years ago
Micah Snyder 72fd33c8b2 clang-format'd using new .clang-format rules. 6 years ago
Micah Snyder (micasnyd) 9280b4ea0f Fix for 3 pdf parsing bugs introduced with the addition of object stream parsing, identified in regression testing. 7 years ago
Micah Snyder d77b8ae0fb Fixes to a handful of bugs identified during regression testing of PDF and UnRAR changes. 7 years ago
Micah Snyder d39cb6581f Updating libclamunrar from legacy C implementation to modern unrar 5.6.5. API changes and supporting changes included to pass the filepath of the scanned file into libclamav through the cli_ctx structure, required by the unrar library to open archives. The filename argument may be optional for the scandesc scanning variant, but libclamav will make a best effort to identify the filename from the file descriptor if it was not provided. In addition, included the ability to prefix temp file and directory names with file basenames. 7 years ago
Micah Snyder (micasnyd) f61e92da8f Changing numerous scan options' names, primarily those of heuristic signatature alert options. Original options (command line and clamd) will remain as deprecated & undocumented for a couple releases. Added 2 extra scan options to allow users to differentiate between alerting on encrypted archives vs encrypted documents (bb11911). 7 years ago
Micah Snyder d7979d4ff7 Restructured scan options flags from a single bitflag field to a structure containing multiple bitflag fields. This also required adding a new function to the bytecode API to get scan options a la carte, and modifying the existing function to hand back scan options in the old/deprecated uint32_t bitflag format. Re-generated bytecode iface header files. 7 years ago
Micah Snyder (micasnyd) 89d5207b31 Added new pdf object stream parsing capability. 7 years ago
Micah Snyder f842e965fe Replacing strntol with strntoul to ensure proper (un)signedness when parsing numbers from PDFs. 7 years ago
Micah Snyder 3955b36133 Adjustment to pdf find_obj logic to allow the parser to skip, continue when it finds objects that cannot be parsed and may not in fact be objects at all. 7 years ago
Micah Snyder 2176b2c358 Uncommenting len adjustment that is clearly correct, needed. 7 years ago
Micah Snyder bf6e777fa7 bb12133: Wrapping cli_strntol to provide easy error detection. Applying cli_strntol_wrap with error checking. Adding logic to identify when a parsing error is in fact a new revision of the PDF. 7 years ago
Micah Snyder 53cbdee38a bb12133: Implementing cli_strntol based on gnu gcc's strtol implementation with modifications to limit string buffer length for non-null terminated strings. Using cli_strntol in pdf.c for added safety. 7 years ago
Micah Snyder (micasnyd) a79be7590e bb12134: Adding missing len decrement and adding additional len check. 7 years ago
Micah Snyder 69b4a22370 bb12006: correction to dictionary length checks when parsing pdf objects. 7 years ago
Micah Snyder 53c957a9da bb12004: adding check for min pdf size needed to check pdf version 7 years ago
Micah Snyder 4a2576fefd Removing hard-coded heuristic signature that flags when a PDF has an abnormally high number of filters. Removing due to false positive and because in its current form it cannot be disabled or modified without recompiling ClamAV. 7 years ago
Micah Snyder c9a070c9d3 More cleanup re: variables possibly used before initialized. 7 years ago
Steven Morgan a5e2b97d24 bb11981 - fix for some unit tests. 8 years ago
Mickey Sola c8ba4ae2e4 11942 - fixing heap overflow in handle_pdfname. Patch submitted by Suleman Ali. 8 years ago