• Sowmini Varadhan's avatar
    crypto: pkcs7 - Fix unaligned access in pkcs7_verify() · 62f57d05
    Sowmini Varadhan authored
    On sparc, we see unaligned access messages on each modprobe[-r]:
    
    Kernel unaligned access at TPC[6ad9b4] pkcs7_verify [..]
    Kernel unaligned access at TPC[6a5484] crypto_shash_finup [..]
    Kernel unaligned access at TPC[6a5390] crypto_shash_update [..]
    Kernel unaligned access at TPC[10150308] sha1_sparc64_update [..]
    Kernel unaligned access at TPC[101501ac] __sha1_sparc64_update [..]
    
    These ware triggered by mod_verify_sig() invocations of pkcs_verify(), and
    are are being caused by an unaligned desc at (sha1, digest_size is 0x14)
            desc = digest + digest_size;
    
    To fix this, pkcs7_verify needs to make sure that desc is pointing
    at an aligned value past the digest_size, and kzalloc appropriately,
    taking alignment values into consideration.
    Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    62f57d05
Name
Last commit
Last update
..
.gitignore Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
asymmetric_keys.h Loading commit data...
asymmetric_type.c Loading commit data...
mscode.asn1 Loading commit data...
mscode_parser.c Loading commit data...
pkcs7.asn1 Loading commit data...
pkcs7_key_type.c Loading commit data...
pkcs7_parser.c Loading commit data...
pkcs7_parser.h Loading commit data...
pkcs7_trust.c Loading commit data...
pkcs7_verify.c Loading commit data...
public_key.c Loading commit data...
public_key.h Loading commit data...
rsa.c Loading commit data...
signature.c Loading commit data...
verify_pefile.c Loading commit data...
verify_pefile.h Loading commit data...
x509.asn1 Loading commit data...
x509_akid.asn1 Loading commit data...
x509_cert_parser.c Loading commit data...
x509_parser.h Loading commit data...
x509_public_key.c Loading commit data...
x509_rsakey.asn1 Loading commit data...