Skip to content

Potential bug in dzmmap #244

Closed
Closed
@javadamiri

Description

@javadamiri

The use of MAP_FIXED flag in the dzmmap functions means we overwrite any previous mapping that may overlap with our current request:

let flags = libc::MAP_ANON | libc::MAP_PRIVATE | libc::MAP_FIXED;

Although it is very unlikely to happen in 64-bits targets, it is still possible.
For example, we do not know how various malloc implementations use the address space, and we may overwrite their mappings.

An alternative is to remove the MAP_FIXED flag and compare the result of mmap with our requested starting address.
AFAIK, they will be the same if there is no overlaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-heapArea: Heap (including Mmapper, VMMap)C-bugCategory: BugF-investigateCall For Participation: Investigate the issue and provide more detailed direction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions