Patch "crypto: drbg - fix freeing of resources" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
crypto: drbg - fix freeing of resources
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:
crypto-drbg-fix-freeing-of-resources.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 <[email protected]> know about it.
Quoted 1 line
From
bd6227a150fdb56e7bb734976ef6e53a2c1cb334Mon Sep 17 00:00:00 2001
From: Stephan Mueller <[email protected]>
Date: Thu, 14 Sep 2017 17:10:28 +0200
Subject: crypto: drbg - fix freeing of resources
From: Stephan Mueller <[email protected]>
commit bd6227a150fdb56e7bb734976ef6e53a2c1cb334 upstream.
During the change to use aligned buffers, the deallocation code path was not updated correctly. The current code tries to free the aligned buffer pointer and not the original buffer pointer as it is supposed to.
Thus, the code is updated to free the original buffer pointer and set the aligned buffer pointer that is used throughout the code to NULL.
--- crypto/drbg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
crypto/drbg.c +4 -4
@@ -1133,10 +1133,10 @@ static inline void drbg_dealloc_state(st {if (!drbg)return ; -kzfree (drbg->V); - drbg->Vbuf =NULL ; -kzfree (drbg->C); - drbg->Cbuf =NULL ; +kzfree (drbg->Vbuf); + drbg->V =NULL ; +kzfree (drbg->Cbuf); + drbg->C =NULL ;kzfree (drbg->scratchpadbuf); drbg->scratchpadbuf =NULL ; drbg->reseed_ctr =0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/crypto-drbg-fix-freeing-of-resources.patch