Re: [PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-28 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 23 Aug 2024 03:11:09 +0900 you wrote: > During the list_for_each_entry_rcu iteration call of xenvif_flush_hash, > kfree_rcu does not exist inside the rcu read critical section, so if > kfree_rcu is called when

Re: [PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-28 Thread Jakub Kicinski
On Wed, 28 Aug 2024 21:52:12 +0900 Jeongjun Park wrote: > > The loop runs with irq disabled, the RCU critical section extends over > > it, uninterrupted. > > Basically, list_for_each_entry_rcu is specified to be used under the > protection > of rcu_read_lock(), but this is not the case with xen

Re: [PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-28 Thread Jeongjun Park
On Tue, 27 Aug 2024 13:19:59 +0200 Paolo Abeni wrote: > On 8/22/24 20:11, Jeongjun Park wrote: > > During the list_for_each_entry_rcu iteration call of xenvif_flush_hash, > > kfree_rcu does not exist inside the rcu read critical section, so if > > The above wording is confusing, do you mean "kfree_

Re: [PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-27 Thread Jakub Kicinski
On Tue, 27 Aug 2024 13:19:59 +0200 Paolo Abeni wrote: > On 8/22/24 20:11, Jeongjun Park wrote: > > During the list_for_each_entry_rcu iteration call of xenvif_flush_hash, > > kfree_rcu does not exist inside the rcu read critical section, so if > > The above wording is confusing, do you mean "kfr

Re: [PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-27 Thread Paolo Abeni
On 8/22/24 20:11, Jeongjun Park wrote: During the list_for_each_entry_rcu iteration call of xenvif_flush_hash, kfree_rcu does not exist inside the rcu read critical section, so if The above wording is confusing, do you mean "kfree_rcu does not exit from "...? kfree_rcu is called when the rc

[PATCH net] net/xen-netback: prevent UAF in xenvif_flush_hash()

2024-08-22 Thread Jeongjun Park
During the list_for_each_entry_rcu iteration call of xenvif_flush_hash, kfree_rcu does not exist inside the rcu read critical section, so if kfree_rcu is called when the rcu grace period ends during the iteration, UAF occurs when accessing head->next after the entry becomes free. Therefore, to