Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unprivileged user can gain root privileges #59

Closed
w194 opened this issue Aug 18, 2015 · 6 comments
Closed

Unprivileged user can gain root privileges #59

w194 opened this issue Aug 18, 2015 · 6 comments

Comments

@w194
Copy link

w194 commented Aug 18, 2015

I'm not sure how the wheel group is treated in docker-alpine but why does it exist if one can gain root privileges without being member of it?

# docker run -i -t --name="test" alpine /bin/sh
/ # adduser -S testuser
/ # groups testuser
nogroup
# docker start test
# docker exec -it --user=testuser test /bin/sh
/ $ whoami
testuser
/ $ su
/ # whoami
root
/ # groups testuser
nogroup
/ # groups root
root bin daemon sys adm disk wheel floppy dialout tape video
/ # 

In ubuntu-docker this does not work.

@yosifkit
Copy link

That just means root has an empty password; the wheel group only matters for the sudo command.

@w194
Copy link
Author

w194 commented Aug 21, 2015

Correct. This is the difference to the containers CentOS and Ubuntu where the root password is disabled by default.

Solution is here: #56
just remove the root account completely when you use alpine, it isn't needed anyway.

@w194 w194 closed this as completed Aug 21, 2015
@zakkg3
Copy link

zakkg3 commented May 9, 2019

why we dont remove root passwd by default in alpine?
https://talosintelligence.com/vulnerability_reports/TALOS-2019-0782

@tianon
Copy link
Collaborator

tianon commented May 9, 2019

See #511

@w194
Copy link
Author

w194 commented May 9, 2019

@zakkg3 just delete root user or use another image. don't expect gliderlabs to fix this considering how often this bug was re-introduced...
there are at least 3 issues about this bug. i wouldn't trust this image at all.

@ncopa
Copy link
Collaborator

ncopa commented May 9, 2019

I think its unfair to blame gliderlabs for this one. It was my mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants