Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:

- crypto API regression that may cause sporadic alloc failures

- double-free bug in drbg

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: drbg - set freed buffers to NULL
crypto: api - fix finding algorithm currently being tested

+10 -3
+8 -3
crypto/api.c
··· 204 204 205 205 down_read(&crypto_alg_sem); 206 206 alg = __crypto_alg_lookup(name, type | test, mask | test); 207 - if (!alg && test) 208 - alg = __crypto_alg_lookup(name, type, mask) ? 209 - ERR_PTR(-ELIBBAD) : NULL; 207 + if (!alg && test) { 208 + alg = __crypto_alg_lookup(name, type, mask); 209 + if (alg && !crypto_is_larval(alg)) { 210 + /* Test failed */ 211 + crypto_mod_put(alg); 212 + alg = ERR_PTR(-ELIBBAD); 213 + } 214 + } 210 215 up_read(&crypto_alg_sem); 211 216 212 217 return alg;
+2
crypto/drbg.c
··· 1134 1134 if (!drbg) 1135 1135 return; 1136 1136 kzfree(drbg->Vbuf); 1137 + drbg->Vbuf = NULL; 1137 1138 drbg->V = NULL; 1138 1139 kzfree(drbg->Cbuf); 1140 + drbg->Cbuf = NULL; 1139 1141 drbg->C = NULL; 1140 1142 kzfree(drbg->scratchpadbuf); 1141 1143 drbg->scratchpadbuf = NULL;