-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG #37929
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
Conversation
This call is what is used to implement `dmesg` to get kernel messages about the host. This can leak substantial information about the host. It is normally available to unprivileged users on the host, unless the sysctl `kernel.dmesg_restrict = 1` is set, but this is not set by standard on the majority of distributions. Blocking this to restrict leaks about the configuration seems correct. Fix moby#37897 See also https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html Signed-off-by: Justin Cormack <[email protected]>
|
Flaky test on windows? https://jenkins.dockerproject.org/job/Docker-PRs-WoW-RS1/22431/console looks like it was marked as flaky a while back, but closed; #29641 |
Codecov Report
@@ Coverage Diff @@
## master #37929 +/- ##
==========================================
+ Coverage 36.08% 36.09% +<.01%
==========================================
Files 610 610
Lines 45126 45135 +9
==========================================
+ Hits 16284 16291 +7
- Misses 26602 26609 +7
+ Partials 2240 2235 -5 |
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
|
i was about to open a PR from the issue but you already did 😍 |
|
@jessfraz that's a LGTM? 🙏 😇 😊 |
|
Yes it is :) |
cpuguy83
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
I'm curious, shouldn't this already be blocked the kernel if the user doesn't have CAP_SYSLOG or CAP_SYS_ADMIN? |
|
Or is that only true if that kernel option is set to true and we want to make sure to block it here? |
|
@cpuguy83 that is only true if the sysctl is set, which it is not by default in most distros. |
|
Looks like we have enough LGTM's; let's merge 🎉 |
This call is what is used to implement
dmesgto get kernel messagesabout the host. This can leak substantial information about the host.
It is normally available to unprivileged users on the host, unless
the sysctl
kernel.dmesg_restrict = 1is set, but this is not setby standard on the majority of distributions. Blocking this to restrict
leaks about the configuration seems correct.
Fix #37897
See also https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html
Signed-off-by: Justin Cormack [email protected]