8000 Memory safety issues in string handlings · Issue #79 · icculus/physfs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Memory safety issues in string handlings #79
Open
@guillaume-uH57J9

Description

@guillaume-uH57J9

PhysFS has some memory safe issues resulting in out-of-bound reads.
These issues were noticed by running tests using Clang's sanitizers (address,signed-integer-overflow).

An obvious impact is the ability to make software crash (ie Denial of Service) by providing malformed archives.
I have not investigated whether more serious exploits are possible or not. My focus is on reporting problems and recommending fixes.

  • physfs_archiver_csm.c: Off-by-one error in array index may lead to accessing memory after the end of the name buffer.
  • physfs_archived_qpak.c: Failure to validate the name is null-terminated may lead to accessing memory after the end of the name buffer.
  • physfs_unicode.c: Off-by-one error in buffer increment may lead to accessing memory after the end of an unicode buffer.

An upcoming merge request will provide a possible fix and will points to specific lines of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0