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

Insecure Temporary File #80

Open
ihsinme opened this issue Oct 25, 2021 · 0 comments
Open

Insecure Temporary File #80

ihsinme opened this issue Oct 25, 2021 · 0 comments

Comments

@ihsinme
Copy link

ihsinme commented Oct 25, 2021

FILE *f = fopen(cam_buf, "w");

FILE *f = fopen(cam_buf, "w");

Good afternoon.
I noticed in your code that the file is being generated, the filename is predictable and you are not setting the file permissions.
this can be used to influence other files on the system (via temporary links) with the right to run your program.
if it's important you need to use mkstemp or mkdtemp.

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

1 participant