Skip to content

The provided way to identify applications is unreliable #15

@Ongy

Description

@Ongy

Unless I am worse at C than I thought, the implemented way to determine the application binary path is to read the /proc/[pid]/exe symlink.

This is sadly not a reliable way. The symlink is always given in the applications mount namespace, not the compositors mount namespace.
With unprivileged user namespaces (which afaik most distributions have available for lxc/docker/etc.) any user application can abuse this to gain any path.

I think this can be (paritally) mitigated by checking /proc/[pid]/ns/nmt and compare it with /proc/self/ns/mnt.

As secondary problem, applications that use interpreters (such as python) will show up as the interpreter. And sadly /proc/[pid]/cmdline is not reliable either to determine which file is interpreted.

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