lkml.org 
[lkml]   [1998]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectBugfix: A patch that fixes a minor loop device bug
    Hello.

    Below is a patch that fixes a minor bug with the loop device. The problem is
    with an empty XOR encryption password, that causes a division by zero.
    The fix: Empty XOR passwords are rejected.

    The patch can be applied on both kernel 2.0.35 and kernel 2.1.115,
    though it has only been tested on 2.0.35.

    Here goes:


    ======
    --- loop.c.original.loop-fix Fri Aug 7 13:09:59 1998
    +++ loop.c Fri Aug 7 17:28:29 1998
    @@ -17,3 +17,7 @@
    + *
    + * Zero length XOR encryption passwords caused a division by zero -
    + * they are now rejected.
    + * By Nimrod Zimerman <zimerman@forfree.at>, August 7, 1998.
    */

    #include <linux/module.h>
    @@ -365,7 +369,7 @@
    case LO_CRYPT_NONE:
    break;
    case LO_CRYPT_XOR:
    - if (info.lo_encrypt_key_size < 0)
    + if (info.lo_encrypt_key_size <= 0)
    return -EINVAL;
    break;
    #ifdef DES_AVAILABLE
    ======
    Nimrod

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

    \
     
     \ /
      Last update: 2005-03-22 13:43    [W:0.020 / U:0.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site