All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "ila_xlat: add missing hash secret initialization" has been added to the 4.9-stable tree
@ 2017-06-18  1:04 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-18  1:04 UTC (permalink / raw)
  To: arnd, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ila_xlat: add missing hash secret initialization

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ila_xlat-add-missing-hash-secret-initialization.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 0db47e3d323411beeb6ea97f2c4d19395c91fd8b Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 8 Jun 2017 09:54:24 +0200
Subject: ila_xlat: add missing hash secret initialization

From: Arnd Bergmann <arnd@arndb.de>

commit 0db47e3d323411beeb6ea97f2c4d19395c91fd8b upstream.

While discussing the possible merits of clang warning about unused initialized
functions, I found one function that was clearly meant to be called but
never actually is.

__ila_hash_secret_init() initializes the hash value for the ila locator,
apparently this is intended to prevent hash collision attacks, but this ends
up being a read-only zero constant since there is no caller. I could find
no indication of why it was never called, the earliest patch submission
for the module already was like this. If my interpretation is right, we
certainly want to backport the patch to stable kernels as well.

I considered adding it to the ila_xlat_init callback, but for best effect
the random data is read as late as possible, just before it is first used.
The underlying net_get_random_once() is already highly optimized to avoid
overhead when called frequently.

Fixes: 7f00feaf1076 ("ila: Add generic ILA translation facility")
Link: https://www.spinics.net/lists/kernel/msg2527243.html
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/ipv6/ila/ila_xlat.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/ipv6/ila/ila_xlat.c
+++ b/net/ipv6/ila/ila_xlat.c
@@ -68,6 +68,7 @@ static inline u32 ila_locator_hash(struc
 {
 	u32 *v = (u32 *)loc.v32;
 
+	__ila_hash_secret_init();
 	return jhash_2words(v[0], v[1], hashrnd);
 }
 


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.9/ila_xlat-add-missing-hash-secret-initialization.patch
queue-4.9/pvrusb2-reduce-stack-usage-pvr2_eeprom_analyze.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-18  1:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18  1:04 Patch "ila_xlat: add missing hash secret initialization" has been added to the 4.9-stable tree gregkh

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.