Fix crash-tracking script/directory permission lockdown - #12330
Fix crash-tracking script/directory permission lockdown#12330jbachorik wants to merge 5 commits into
Conversation
Clear all permission bits before setting owner-only ones so stray group/other bits from the process umask are actually stripped, and fix the OOME notifier script lockdown to operate on the script file instead of the directory.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07272fd581
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
A normal 0022 umask leaves the crash uploader script at mode 0544. The next JVM start rejects this script, and the new directory tests do not run the changed directory code.
🤖 Datadog Autotest · Commit 97b09bd · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
What Does This Do
Fixes permission inconsistency for the crash-uploader and OOME-notifier script initializers.
The code expects
drwx------but with the current version we getdrwx------ | <whatever mask is default>and the crashtracker init check fails and crashtracking is disabled.OOMENotifierScriptInitializer, the block that locks down the freshly-copied script file mistakenly operated on the script directory instead of the script file, leaving the copied script file's permissions unrestricted. It now correctly targets the script file.ScriptInitializerSecurityTestasserting exact owner-only permissions on the created directories and on the OOME notifier script file.Motivation
Unexpectedly wide privileges were left on the crash-tracking script directories/files, which prevented crash tracking from working.
Additional Notes
Jira ticket: PROF-15846
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issue