Commit:     679ce0ace6b1a07043bc3b405a34ddccad808886
Parent:     39a279026609c205d331ec39fea11b2fd470a054
Author:     Matt Mackall <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 16 10:16:11 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Jun 16 13:16:16 2007 -0700

    random: fix output buffer folding
    (As reported by [EMAIL PROTECTED])
    Folding is done to minimize the theoretical possibility of systematic
    weakness in the particular bits of the SHA1 hash output.  The result of
    this bug is that 16 out of 80 bits are un-folded.  Without a major new
    vulnerability being found in SHA1, this is harmless, but still worth
    Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>
    Cc: Theodore Ts'o <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/char/random.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 0474cac..7f52712 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -794,7 +794,7 @@ static void extract_buf(struct entropy_store *r, __u8 *out)
        buf[0] ^= buf[3];
        buf[1] ^= buf[4];
-       buf[0] ^= rol32(buf[3], 16);
+       buf[2] ^= rol32(buf[2], 16);
        memcpy(out, buf, EXTRACT_SIZE);
        memset(buf, 0, sizeof(buf));
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to