Re: [PATCH wpan] mac802154: fix llsec key resources release in mac802154_llsec_key_del

2024-03-06 Thread Stefan Schmidt
Hello. On 28.02.24 17:38, Fedor Pchelkin wrote: mac802154_llsec_key_del() can free resources of a key directly without following the RCU rules for waiting before the end of a grace period. This may lead to use-after-free in case llsec_lookup_key() is traversing the list of keys in parallel with

Re: Re: [PATCH wpan] mac802154: fix llsec key resources release in mac802154_llsec_key_del

2024-03-06 Thread Alexander Aring
Hi, On Mon, Mar 4, 2024 at 2:25 AM Fedor Pchelkin wrote: > > Hello Alexander, > > Thanks for review! > > On 24/03/03 06:19PM, Alexander Aring wrote: > > Hi, > > > > On Wed, Feb 28, 2024 at 11:44 AM Fedor Pchelkin wrote: > > > > > > mac802154_llsec_key_del() can free resources of a key directly w

Re: Re: [PATCH wpan] mac802154: fix llsec key resources release in mac802154_llsec_key_del

2024-03-03 Thread Fedor Pchelkin
Hello Alexander, Thanks for review! On 24/03/03 06:19PM, Alexander Aring wrote: > Hi, > > On Wed, Feb 28, 2024 at 11:44 AM Fedor Pchelkin wrote: > > > > mac802154_llsec_key_del() can free resources of a key directly without > > following the RCU rules for waiting before the end of a grace perio

Re: [PATCH wpan] mac802154: fix llsec key resources release in mac802154_llsec_key_del

2024-03-03 Thread Alexander Aring
Hi, On Wed, Feb 28, 2024 at 11:44 AM Fedor Pchelkin wrote: > > mac802154_llsec_key_del() can free resources of a key directly without > following the RCU rules for waiting before the end of a grace period. This > may lead to use-after-free in case llsec_lookup_key() is traversing the > list of ke

[PATCH wpan] mac802154: fix llsec key resources release in mac802154_llsec_key_del

2024-02-28 Thread Fedor Pchelkin
mac802154_llsec_key_del() can free resources of a key directly without following the RCU rules for waiting before the end of a grace period. This may lead to use-after-free in case llsec_lookup_key() is traversing the list of keys in parallel with a key deletion: refcount_t: addition on 0; use-aft