From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754125AbbJNO3X (ORCPT ); Wed, 14 Oct 2015 10:29:23 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:58509 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbbJNO3V (ORCPT ); Wed, 14 Oct 2015 10:29:21 -0400 Date: Wed, 14 Oct 2015 22:29:15 +0800 From: Herbert Xu To: Sowmini Varadhan Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, dhowells@redhat.com, marcel@holtmann.org, David.Woodhouse@intel.com Subject: Re: [PATCH] crypto/pkcs7_verify: Fix unaligned access in pkcs7_verify() Message-ID: <20151014142915.GI17455@gondor.apana.org.au> References: <20151013145401.GM20800@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151013145401.GM20800@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2015 at 10:54:01AM -0400, Sowmini Varadhan wrote: > > 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: Sowmini Varadhan Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt