You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ima: Set file->f_mode instead of file->f_flags in ima_calc_file_hash()
Commit a408e4a ("ima: open a new file instance if no read
permissions") tries to create a new file descriptor to calculate a file
digest if the file has not been opened with O_RDONLY flag. However, if a
new file descriptor cannot be obtained, it sets the FMODE_READ flag to
file->f_flags instead of file->f_mode.
This patch fixes this issue by replacing f_flags with f_mode as it was
before that commit.
Cc: [email protected] # 4.20.x
Fixes: a408e4a ("ima: open a new file instance if no read permissions")
Signed-off-by: Roberto Sassu <[email protected]>
Reviewed-by: Goldwyn Rodrigues <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
0 commit comments