[lkml]   [2010]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/1][BUG][IMPORTANT] KEYRINGS: find_keyring_by_name() can gain the freed keyring
    Thanks for your comments.

    David Howells wrote:
    > Toshiyuki Okajima <> wrote:
    >> With linux-2.6.34-rc5, find_keyring_by_name() can gain the keyring which has
    >> been already freed. And then, its space (which is gained by
    >> find_keyring_by_name()) is broken by accessing the freed keyring as the
    >> available keyring.
    > Good catch!

    > I'm not sure this is the best solution, though.
    This means that the keyring of which the count became 0 should not usually
    be used again?
    If yes, I think so, too.

    > The alternative is just to ignore keys that have a zero usage count.
    OK. I applied your suggestion and I remade the patch.
    Then I confirmed that the system with new fix could continue to work while
    I was executing my reproducer and your reproducer.
    [your reproducer]
    > for ((i=0; i<100000; i++)); do keyctl session wibble /bin/true || break; done

    So, I think my new patch is also fixed.
    Please check it.(new patch is attached into the following mail.)

    Toshiyuki Okajima

     \ /
      Last update: 2010-04-23 12:49    [W:0.020 / U:3.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site