projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02717d9
)
dm crypt: use memzero_explicit for on-stack buffer
author
Milan Broz
<gmazyland@gmail.com>
Sat, 22 Nov 2014 08:36:04 +0000
(09:36 +0100)
committer
Mike Snitzer
<snitzer@redhat.com>
Tue, 2 Dec 2014 15:25:07 +0000
(10:25 -0500)
Use memzero_explicit to cleanup sensitive data allocated on stack
to prevent the compiler from optimizing and removing memset() calls.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-crypt.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-crypt.c
b/drivers/md/dm-crypt.c
index cd15e0801228437fb7945c300ca4ca206ffc8efe..ce11a90a33c3eb455932bd5644066835511883de 100644
(file)
--- a/
drivers/md/dm-crypt.c
+++ b/
drivers/md/dm-crypt.c
@@
-711,7
+711,7
@@
static int crypt_iv_tcw_whitening(struct crypt_config *cc,
for (i = 0; i < ((1 << SECTOR_SHIFT) / 8); i++)
crypto_xor(data + i * 8, buf, 8);
out:
- mem
set(buf, 0
, sizeof(buf));
+ mem
zero_explicit(buf
, sizeof(buf));
return r;
}