Re: [PATCH v2] keys: Fix UAF in key_put()

From: David Howells
Date: Wed Mar 19 2025 - 14:47:55 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxx> wrote:

> We really should have "test_bit_acquire()" and "set_bit_release()".

I considered using test_bit_acquire() but, as you say, there's no
set_bit_release() as yet. I could switch things to initialise the flag to set
on key creation and clear the flag instead.

David