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

fix: improve file checks for procfs knobs #252

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

robbat2
Copy link
Member

@robbat2 robbat2 commented Jan 2, 2025

CodeQL checks flagged this pattern as a TOCTOU race.

privsep-linux.c Fixed Show resolved Hide resolved
Copy link
Member

@stappersg stappersg left a comment

Choose a reason for hiding this comment

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

in doubt about this one, approving for getting the project forward

@robbat2
Copy link
Member Author

robbat2 commented Jan 2, 2025

I'm thinking we should NOT merge this, and instead find a way to annotate for CodeQL that this is not vulnerable; specifically, if the file doe NOT exist, the write never happens.

@stappersg
Copy link
Member

stappersg commented Jan 2, 2025 via email

CodeQL checks flagged this pattern as a TOCTOU race.

Signed-off-by: Robin H. Johnson <[email protected]>
@robbat2 robbat2 force-pushed the robbat2/20250102-privsep branch from 945a580 to 133fed4 Compare January 2, 2025 22:12
@robbat2 robbat2 merged commit f4d1568 into master Jan 2, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants