Skip to content

Mount targets are not validated #3759

@Sploder12

Description

@Sploder12

Describe the bug
The mount target is not checked/validated to be a valid path. This allows for interesting targets to be used.

To Reproduce

  1. launch multipass GUI
  2. create a mount with a valid source but invalid target such as " & mkdir hello & "
  3. observe mount fails for some reason, that may not be "bad mount point"
  4. shell into the instance
  5. observe ~/hello exists

Also works in CLI but less interesting.

Expected behavior
The daemon prevents the usage of such targets without allowing side effects.

Additional context
Mount source is verified to be an existing file but, it might make sense to also validate the source as well. Windows paths are important to consider for both source and target since C:\foo\ is a valid path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughighHigh priority. Combine with "medium" to signal intermediate medium-high priority.jiraCreate a Jira ticket for this issuemediumMedium priority. Combine with "low" or "high" to signal intermediate priority.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions