-
Notifications
You must be signed in to change notification settings - Fork 40
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
enhancement: ability to set fs.suid_dumpable #7
Comments
This is an interesting feature - Do you have a sample container definition to illustrate and test the requirement? |
The following triggers a segfault after setuid, and the fs.suid_dumpable flag default of 0 provides no coredump, whereas 2 it does. It's not otherwise as simple as https://gist.github.com/andytson-inviqa/e1c933ccaa1825a9c4449cbf823c3c13 |
Quick update I have an implementation of this here https://github.com/IBM/core-dump-handler/tree/suid-support |
Actually setting up the new quay repo was easier than I thought I have to wrap up for the day but you can point the chart to |
Tested the https://github.com/IBM/core-dump-handler/tree/suid-support branch with the command
Where quay.io/icdh/segfaulter is based on the code initially supplied. -> https://github.com/No9/segfaulter There was a nit in the quote escaping in the chart but now seems to work and core-dumps are generated as expected. |
I've tested it myself and it appears to work as expected. One comment though, but should SUID_LIMIT instead be called SUID_DUMPABLE? As for quotes in helm, I tend to do |
also thanks for the logs location fix, I was wondering why it was in /node without a container mount to view it |
Appreciate the feedback - changed to SUID_DUMPABLE and used quote - thanks for the tip. |
lock code seems to be working well - Ran with 5ms intervals and the file uploads uncorrupted. |
Lots of applications start as root user, and setuid in order to run with lower privileges. This is usually to do with opening log files or binding to privileged ports.
Segfaults from these setuid'd processes do not create core dumps by default, and require the sysctl config
fs.suid_dumpable
set to 1 or 2.Would it be possible to have an env var for the core-dump-agent to set this sysctl setting? 2 should be best, as it prevents the process being able to read it (if the host volume was even mounted in the container).
Processes that do this include:
The text was updated successfully, but these errors were encountered: