Skip to content

Unauthorized Modification of Host Filesystem (/home/linuxbrew Created Without Permission) #187

@hopeseekr

Description

@hopeseekr

Summary:
Running the docker-wine launcher script modified my host system without consent. Specifically, it created the directory /home/linuxbrew on the host filesystem — even though my user does not have write access to /home and I did not grant the script permission to modify anything outside Docker.


Steps to Reproduce

  1. Download and execute the docker-wine launcher script (from this repository) as a normal user, e.g.:

    ./docker-wine
  2. Observe that /home/linuxbrew is created on the host system.


Expected Behavior

  • The script should only start Docker containers and never modify the host environment.
  • It should not install Homebrew, PulseAudio, XQuartz, or any other host-level packages.
  • It should not create directories outside $HOME, particularly ones requiring elevated privileges like /home/linuxbrew.

Actual Behavior

  • After running the script, a new directory /home/linuxbrew was created on the host:

    ls -ld /home/linuxbrew
    drwxr-xr-x  5 root root ...
  • My user cannot normally create this directory:

    mkdir /home/linuxbrew
    mkdir: cannot create directory ‘/home/linuxbrew’: Permission denied
  • This indicates that a Docker container running as root wrote to the host filesystem via a bind mount.


Security Impact

This behavior constitutes a security vulnerability:

  • Containerized code executed as root modified the host filesystem outside of expected paths.
  • No user consent or warning was provided.
  • Host directories should never be altered unless explicitly specified via -v or similar options.

This could be exploited by a malicious Docker image or package install script to write arbitrary files on the host system as root.


Environment

  • Host OS: Linux (non-root user, /home not writable by normal users)
  • Docker Version: 28.5.0
  • docker-wine Version / Tag: latest
  • Command Used: ./docker-wine
  • Result: /home/linuxbrew created by container root

Suggested Fix

  1. Remove all automatic installation or host modification logic (install_xquartz, install_pulseaudio, etc.).

  2. Never mount /home from the host into the container unless explicitly requested by the user.

  3. Run containers with:

    --user $(id -u):$(id -g) --read-only --security-opt no-new-privileges
  4. Add a prominent warning in the README about potential host modifications until resolved.


Impact Severity:

High — Unauthorized host modification and potential privilege escalation through Docker bind mounts.

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