Skip to content

Conversation

@dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Mar 8, 2024

- What I did

Attempt to clarify the permissions and capabiliities (and risks) with
using the --privileged flag.

Relates to moby/moby#24387

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@dvdksn dvdksn requested a review from thaJeztah as a code owner March 8, 2024 15:19
@codecov-commenter
Copy link

Codecov Report

Merging #4929 (de7c7bc) into master (952c807) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4929   +/-   ##
=======================================
  Coverage   61.46%   61.46%           
=======================================
  Files         289      289           
  Lines       20229    20229           
=======================================
  Hits        12433    12433           
  Misses       6895     6895           
  Partials      901      901           

### <a name="privileged"></a> Full container capabilities (--privileged)
### <a name="privileged"></a> Escalate container privileges (--privileged)

The `--privileged` flag gives the following capabilities to a container:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also wondering if we should add a (more detailed?) section in the https://docs.docker.com/go/daemon-access/ section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What sort of information do you think we should add to this page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(asking because it's not immediately obvious to me what --privileged has to do with post-install actions, or with user group permissions)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, more in line of the "daemon attack vector". Being able to start a privileged container is a prime example of "bad things" people could do when having access to the API (hope that makes sense)

@thaJeztah
Copy link
Member

Looks like validation is failing on this one (docker exec docs having to be re-generated?)

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@neersighted neersighted merged commit 2ae903e into docker:master Mar 20, 2024
@dvdksn dvdksn deleted the privileged-flag branch March 20, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants