Skip to content

Insecure Temporary File #80

@ihsinme

Description

@ihsinme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions