Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
um: Do not set unsecure permission for temporary file
Remove the insecure 0777 mode for temporary file to prohibit other users to change the executable mapped code. An attacker could gain access to the mapped file descriptor from the temporary file (before it is unlinked) in a read-only mode but it should not be accessible in write mode to avoid arbitrary code execution. To not change the hostfs behavior, the temporary file creation permission now depends on the current umask(2) and the implementation of mkstemp(3). Signed-off-by: Mickaël Salaün <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Richard Weinberger <[email protected]> Acked-by: Tristan Schmelcher <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
- Loading branch information