Skip to content

Opening /proc/self/* and /proc/<pid>/* opens the wrong files (especially /proc/self/maps) #3541

@sporksmith

Description

@sporksmith

Noticed while working on #2693 - the golang runtime opens and reads /proc/self/maps, but because we open the file from shadow and don't otherwise remap the path name, this opens shadow's maps file. In addition to possibly breaking whatever the runtime is trying to do with those maps, the result is non-deterministic since ASLR isn't disabled for the shadow process itself (and changes dynamically).

I think in our file path handling we want to replace /proc/self/* (and /proc/<virtual-pid>/*) with /proc/<native-pid>/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugError or flaw producing unexpected results

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions