Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !4252

i#4237: Fix realloc over-read

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i4237-aligned-realloc-bug into master Apr 15, 2020
  • Overview 7
  • Commits 4
  • Pipelines 0
  • Changes 3

Fixes a bug from 228933df #4237 (closed) where redirect_realloc() was not updated to read the new malloc header, resulting in a memcpy that reads beyond the end of the original allocation, which can crash if it's at the end of a heap block with a subsequent guard page.

Adds at least some sanity checks of realloc to the alignment test. I tried to construct a regression test to reproduce the crash in the bug, but it is not possible in a straightforward way just using the public interface as it requires knowing what is beyond an allocation or how two allocations are arranged and what headers or other bytes are in between.

Fixes #4237 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i4237-aligned-realloc-bug