kernel-fxtec-pro1x/drivers/crypto/vmx
Li Zhong 901d3d4fee crypto: vmx - fix null dereference in p8_aes_xts_crypt
walk.iv is not assigned a value in blkcipher_walk_init. It makes iv uninitialized.
It is possibly a null value(as shown below), which is then used by aes_p8_encrypt.

This patch moves iv = walk.iv after blkcipher_walk_virt, in which walk.iv is set.

[17856.268050] Unable to handle kernel paging request for data at address 0x00000000
[17856.268212] Faulting instruction address: 0xd000000002ff04bc
7:mon> t
[link register   ] d000000002ff47b8 p8_aes_xts_crypt+0x168/0x2a0 [vmx_crypto]   (938)
[c000000013b77960] d000000002ff4794 p8_aes_xts_crypt+0x144/0x2a0 [vmx_crypto] (unreliable)
[c000000013b77a70] c000000000544d64 skcipher_decrypt_blkcipher+0x64/0x80
[c000000013b77ac0] d000000003c0175c crypt_convert+0x53c/0x620 [dm_crypt]
[c000000013b77ba0] d000000003c043fc kcryptd_crypt+0x3cc/0x440 [dm_crypt]
[c000000013b77c50] c0000000000f3070 process_one_work+0x1e0/0x590
[c000000013b77ce0] c0000000000f34c8 worker_thread+0xa8/0x660
[c000000013b77d80] c0000000000fc0b0 kthread+0x110/0x130
[c000000013b77e30] c0000000000098f0 ret_from_kernel_thread+0x5c/0x6c

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-08-24 20:51:20 +08:00
..
.gitignore crypto: vmx - Ignore generated files 2016-07-20 22:41:44 +08:00
aes.c powerpc: Create disable_kernel_{fp,altivec,vsx,spe}() 2015-12-01 13:52:25 +11:00
aes_cbc.c crypto: vmx - Increase priority of aes-cbc cipher 2016-06-13 17:43:05 +08:00
aes_ctr.c crypto: vmx - Increase priority of aes-cbc cipher 2016-06-13 17:43:05 +08:00
aes_xts.c crypto: vmx - fix null dereference in p8_aes_xts_crypt 2016-08-24 20:51:20 +08:00
aesp8-ppc.h crypto: vmx - Adding asm subroutines for XTS 2016-07-19 15:42:43 +08:00
aesp8-ppc.pl crypto: vmx - Fix aes_p8_xts_decrypt build failure 2016-07-20 22:41:45 +08:00
ghash.c powerpc: Create disable_kernel_{fp,altivec,vsx,spe}() 2015-12-01 13:52:25 +11:00
ghashp8-ppc.pl crypto: vmx - Fixing GHASH Key issue on little endian 2015-08-18 10:30:36 +08:00
Kconfig crypto: vmx - Convert to CPU feature based module autoloading 2016-07-21 20:33:57 +10:00
Makefile crypto: vmx - Adding support for XTS 2016-07-19 15:42:43 +08:00
ppc-xlate.pl crypto: vmx - Fix ABI detection 2016-06-13 17:43:04 +08:00
vmx.c powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00