diff options
author | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-01-11 10:09:44 +0000 |
---|---|---|
committer | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-01-11 10:09:44 +0000 |
commit | 3b4072dd5163a3c86d328ceaeb0432a238413999 (patch) | |
tree | a68bc9ff609257e443caffa32dd72272961a53b7 /security | |
parent | b5636ee38103571215f33282653a30f990492fb1 (diff) | |
parent | b300b28b78145b832f1112d77035111e35112cec (diff) |
Merge tag 'v5.4.74' into 5.4-2.3.x-imx
This is the 5.4.74 stable release
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/evm/evm_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index a2c393385db0..615094eda36d 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c @@ -183,6 +183,12 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, break; case EVM_IMA_XATTR_DIGSIG: case EVM_XATTR_PORTABLE_DIGSIG: + /* accept xattr with non-empty signature field */ + if (xattr_len <= sizeof(struct signature_v2_hdr)) { + evm_status = INTEGRITY_FAIL; + goto out; + } + hdr = (struct signature_v2_hdr *)xattr_data; digest.hdr.algo = hdr->hash_algo; rc = evm_calc_hash(dentry, xattr_name, xattr_value, |