Skip to content

Conversation

@r0ny123
Copy link
Contributor

@r0ny123 r0ny123 commented Dec 4, 2025

No description provided.

google-labs-jules bot and others added 5 commits December 4, 2025 06:51
- Fix **Critical DoS in ELF Loader**: Added `MAX_IMAGE_SIZE` check in `ElfFileLoader.py` to prevent unbounded memory allocation from malicious headers.
- Fix **Silent PE Corruption**: Added `MAX_IMAGE_SIZE` check in `PeFileLoader.py` and changed behavior to raise `ValueError` instead of silently ignoring limits and producing corrupted mappings.
- Fix **Performance DoS in String Extraction**: Updated `detect_ascii_len` and `detect_unicode_len` in `StringExtractor.py` to enforce `maxlen` during iteration, preventing O(N) scans on large buffers. Added bounds checks for initial reads.
- Fix **Uncaught Exceptions**: Wrapped `FileLoader` usage in `Disassembler.py` within the main `try/except` block to prevent application crashes on malformed inputs.
- Fix **Initialization Crash**: Added check for uninitialized backend in `_disassemble`.
- Fix **Global Logging**: Removed `lief.logging.disable()` from library files to respect user configuration.
- Refactored `ElfFileLoader.getBaseAddress` to reuse `lief.parse` result, improving performance.
- Refactored `BinaryInfo` initialization in `Disassembler.py` to reduce code duplication.
- Addressed LIEF parsing robustness by checking for `None` returns.
- Applied code formatting.
- Fix **Critical DoS in ELF Loader**: Added `MAX_IMAGE_SIZE` check in `ElfFileLoader.py` to prevent unbounded memory allocation from malicious headers.
- Fix **Silent PE Corruption**: Added `MAX_IMAGE_SIZE` check in `PeFileLoader.py` and changed behavior to raise `ValueError` instead of silently ignoring limits and producing corrupted mappings.
- Fix **Unbounded Memory in MachO Loader**: Added `MAX_IMAGE_SIZE` check in `MachoFileLoader.py`.
- Fix **Performance DoS in String Extraction**: Updated `detect_ascii_len` and `detect_unicode_len` in `StringExtractor.py` to enforce `maxlen` during iteration, preventing O(N) scans on large buffers. Added bounds checks for initial reads.
- Fix **Uncaught Exceptions**: Wrapped `FileLoader` usage in `Disassembler.py` within the main `try/except` block to prevent application crashes on malformed inputs.
- Fix **Initialization Crash**: Added check for uninitialized backend in `_disassemble`.
- Fix **Global Logging**: Removed `lief.logging.disable()` from library files to respect user configuration. Added it to `analyze.py` (CLI entry point).
- Refactored `ElfFileLoader.getBaseAddress` to reuse `lief.parse` result, improving performance.
- Refactored `BinaryInfo` initialization in `Disassembler.py` to reduce code duplication.
- Addressed LIEF parsing robustness by checking for `None` returns.
- Applied code formatting.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Fix ARM architecture detection: change `==` to `in` for list comparison
  (the previous code would always return False for ARM architectures)
- Add null checks for lief.parse() returns to match ElfFileLoader safety
- Add optional macho_file parameter to getBaseAddress() for performance
  (reuses parsed LIEF object in mapBinary to avoid redundant parsing)
Change default return value for getArchitecture function.
@danielplohmann danielplohmann merged commit 5bcd27c into danielplohmann:master Dec 17, 2025
7 checks passed
@r0ny123 r0ny123 deleted the fix-security-reliability-perf-issues-1 branch December 17, 2025 15:59
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

Successfully merging this pull request may close these issues.

3 participants