From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753496AbbJOPQM (ORCPT ); Thu, 15 Oct 2015 11:16:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35603 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbbJOPQK (ORCPT ); Thu, 15 Oct 2015 11:16:10 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20151013145401.GM20800@oracle.com> References: <20151013145401.GM20800@oracle.com> To: Sowmini Varadhan Cc: dhowells@redhat.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, marcel@holtmann.org, David.Woodhouse@intel.com Subject: Re: [PATCH] crypto/pkcs7_verify: Fix unaligned access in pkcs7_verify() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20286.1444922164.1@warthog.procyon.org.uk> Date: Thu, 15 Oct 2015 16:16:04 +0100 Message-ID: <20287.1444922164@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: David Howells