diff options
author | Alexander Inyukhin <shurick@sectorb.msk.ru> | 2015-09-26 15:24:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-04 11:01:13 +0100 |
commit | 1d5c47f555c5ae050fad22e4a99f88856cae5d05 (patch) | |
tree | 96e5c8c287c31a5b243345e11cd779927c24dae3 /drivers/usb | |
parent | 8484bf2981b3d006426ac052a3642c9ce1d8d980 (diff) | |
download | linux-1d5c47f555c5ae050fad22e4a99f88856cae5d05.tar.gz linux-1d5c47f555c5ae050fad22e4a99f88856cae5d05.tar.bz2 linux-1d5c47f555c5ae050fad22e4a99f88856cae5d05.zip |
USB: chaoskey read offset bug
Rng reads in chaoskey driver could return the same data under
the certain conditions.
Signed-off-by: Alexander Inyukhin <shurick@sectorb.msk.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/chaoskey.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c index 3ad5d19e4d04..23c794813e6a 100644 --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -472,7 +472,7 @@ static int chaoskey_rng_read(struct hwrng *rng, void *data, if (this_time > max) this_time = max; - memcpy(data, dev->buf, this_time); + memcpy(data, dev->buf + dev->used, this_time); dev->used += this_time; |