]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi: ensure RNG is seeded before use
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 8 Jun 2017 02:34:26 +0000 (22:34 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jun 2017 02:06:28 +0000 (22:06 -0400)
commite44b5afaed58f6d713e4f0f66cde6feea8626d27
treec926aac68602cbf76c6aa121fcacf5902cfc749f
parentcb0fa71aa1435119b9b391de0410b5d495d68ec2
iscsi: ensure RNG is seeded before use

It's not safe to use weak random data here, especially for the challenge
response randomness. Since we're always in process context, it's safe to
simply wait until we have enough randomness to carry out the
authentication correctly.

While we're at it, we clean up a small memleak during an error
condition.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Lee Duncan <lduncan@suse.com>
Cc: Chris Leech <cleech@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
drivers/target/iscsi/iscsi_target_auth.c
drivers/target/iscsi/iscsi_target_login.c