All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Kent Yoder <key@linux.vnet.ibm.com>,
	Herbert Xu <herbert@gondor.hengli.com.au>
Subject: [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512
Date: Tue, 24 Apr 2012 15:32:55 -0700	[thread overview]
Message-ID: <20120424223253.622038828@linuxfoundation.org> (raw)
In-Reply-To: <20120424223311.GA8456@kroah.com>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kent Yoder <key@linux.vnet.ibm.com>

commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.

The current code only increments the upper 64 bits of the SHA-512 byte
counter when the number of bytes hashed happens to hit 2^64 exactly.

This patch increments the upper 64 bits whenever the lower 64 bits
overflows.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/sha512_generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, c
 	index = sctx->count[0] & 0x7f;
 
 	/* Update number of bytes */
-	if (!(sctx->count[0] += len))
+	if ((sctx->count[0] += len) < len)
 		sctx->count[1]++;
 
         part_len = 128 - index;



WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Kent Yoder <key@linux.vnet.ibm.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512
Date: Tue, 24 Apr 2012 15:32:55 -0700	[thread overview]
Message-ID: <20120424223253.622038828@linuxfoundation.org> (raw)
In-Reply-To: <20120424223311.GA8456@kroah.com>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kent Yoder <key@linux.vnet.ibm.com>

commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.

The current code only increments the upper 64 bits of the SHA-512 byte
counter when the number of bytes hashed happens to hit 2^64 exactly.

This patch increments the upper 64 bits whenever the lower 64 bits
overflows.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/sha512_generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, c
 	index = sctx->count[0] & 0x7f;
 
 	/* Update number of bytes */
-	if (!(sctx->count[0] += len))
+	if ((sctx->count[0] += len) < len)
 		sctx->count[1]++;
 
         part_len = 128 - index;



  parent reply	other threads:[~2012-04-24 22:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
2012-04-24 22:32 ` [ 01/42] Perf: fix build breakage Greg KH
2012-04-24 22:32 ` Greg KH [this message]
2012-04-24 22:32   ` [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512 Greg KH
2012-04-24 22:32 ` [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes Greg KH
2012-04-25 19:46   ` Ben Hutchings
2012-04-26 21:16     ` Greg KH
2012-04-24 22:32 ` [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally Greg KH
2012-04-24 22:32 ` [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR Greg KH
2012-04-24 22:32 ` [ 06/42] xen/gntdev: do not set VM_PFNMAP Greg KH
2012-04-24 22:33 ` [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends Greg KH
2012-04-24 22:33 ` [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer Greg KH
2012-04-24 22:33 ` [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb Greg KH
2012-04-24 22:33 ` [ 10/42] uwb: fix use of del_timer_sync() in interrupt Greg KH
2012-04-24 22:33 ` [ 11/42] uwb: fix error handling Greg KH
2012-04-24 22:33 ` [ 12/42] davinci_mdio: Fix MDIO timeout check Greg KH
2012-04-24 22:33 ` [ 13/42] media: rc-core: set mode for winbond-cir Greg KH
2012-04-24 22:33 ` [ 14/42] cfg80211: fix interface combinations check Greg KH
2012-04-24 22:33 ` [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap Greg KH
2012-04-24 22:33 ` [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush Greg KH
2012-04-24 22:33 ` [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values Greg KH
2012-04-24 22:33 ` [ 18/42] pch_uart: Fix dma channel unallocated issue Greg KH
2012-04-24 22:33 ` [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock Greg KH
2012-04-24 22:33 ` [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx Greg KH
2012-04-24 22:33 ` [ 21/42] EHCI: always clear the STS_FLR status bit Greg KH
2012-04-24 22:33 ` [ 22/42] USB: fix deadlock in bConfigurationValue attribute method Greg KH
2012-04-24 22:33 ` [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix) Greg KH
2012-04-24 22:33 ` [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized Greg KH
2012-04-24 22:33 ` [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync Greg KH
2012-04-24 22:33 ` [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs Greg KH
2012-04-24 22:33 ` [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at() Greg KH
2012-04-24 22:33 ` [ 28/42] Bluetooth: Add support for Atheros [04ca:3005] Greg KH
2012-04-24 22:33 ` [ 29/42] Dont limit non-nested epoll paths Greg KH
2012-04-24 22:33 ` [ 30/42] spi: Fix device unregistration when unregistering the bus master Greg KH
2012-04-24 22:33 ` [ 31/42] rt2x00: Properly identify rt2800usb devices Greg KH
2012-04-24 22:33 ` [ 32/42] rt2800usb: Add new device ID for Belkin Greg KH
2012-04-24 22:33 ` [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP Greg KH
2012-04-24 22:33 ` [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550 Greg KH
2012-04-24 22:33 ` [ 35/42] rt2x00: Identify rt2800usb chipsets Greg KH
2012-04-24 22:33 ` [ 36/42] nfsd: fix compose_entry_fh() failure exits Greg KH
2012-04-24 22:33 ` [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian Greg KH
2012-04-24 22:33 ` [ 38/42] ocfs2: ->l_next_free_req breakage " Greg KH
2012-04-24 22:33 ` [ 39/42] ocfs: ->rl_used " Greg KH
2012-04-24 22:33 ` [ 40/42] ocfs2: ->rl_count endianness breakage Greg KH
2012-04-24 22:33 ` [ 41/42] ocfs2: ->e_leaf_clusters " Greg KH
2012-04-24 22:33 ` [ 42/42] lockd: fix the endianness bug Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120424223253.622038828@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=herbert@gondor.hengli.com.au \
    --cc=key@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.