aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fast_commit.c
diff options
context:
space:
mode:
authorTHOBY Simon <[email protected]>2021-08-22 08:55:26 +0000
committerMimi Zohar <[email protected]>2021-08-23 22:22:00 +0000
commitcb181da161963eddc9de0000de6ab2c7942be219 (patch)
treecf41ca44b1e7b216b75f9ffdc0c13fe776d144e6 /fs/ext4/fast_commit.c
parentMerge branch 'restrict-digest-alg-v8' into next-integrity (diff)
downloadkernel-cb181da161963eddc9de0000de6ab2c7942be219.tar.gz
kernel-cb181da161963eddc9de0000de6ab2c7942be219.zip
IMA: reject unknown hash algorithms in ima_get_hash_algo
The new function validate_hash_algo() assumed that ima_get_hash_algo() always return a valid 'enum hash_algo', but it returned the user-supplied value present in the digital signature without any bounds checks. Update ima_get_hash_algo() to always return a valid hash algorithm, defaulting on 'ima_hash_algo' when the user-supplied value inside the xattr is invalid. Signed-off-by: THOBY Simon <[email protected]> Reported-by: [email protected] Fixes: 50f742dd9147 ("IMA: block writes of the security.ima xattr with unsupported algorithms") Reviewed-by: Lakshmi Ramasubramanian <[email protected]> Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
0 files changed, 0 insertions, 0 deletions