lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] ieee802154: hwsim: Fix memory leak in hwsim_add_one
From
Date
Hello.

On 22.06.21 20:29, Alexander Aring wrote:
> Hi,
>
> On Tue, 15 Jun 2021 at 22:09, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
>>
>> No matter from hwsim_remove or hwsim_del_radio_nl, hwsim_del fails to
>> remove the entry in the edges list. Take the example below, phy0, phy1
>> and e0 will be deleted, resulting in e1 not freed and accessed in the
>> future.
>>
>> hwsim_phys
>> |
>> ------------------------------
>> | |
>> phy0 (edges) phy1 (edges)
>> ----> e1 (idx = 1) ----> e0 (idx = 0)
>>
>> Fix this by deleting and freeing all the entries in the edges list
>> between hwsim_edge_unsubscribe_me and list_del(&phy->list).
>>
>> Reported-by: syzbot+b80c9959009a9325cdff@syzkaller.appspotmail.com
>> Fixes: 1c9f4a3fce77 ("ieee802154: hwsim: fix rcu handling")
>> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
>
> Acked-by: Alexander Aring <aahringo@redhat.com>
>
> Thanks!


This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!

regards
Stefan Schmidt

\
 
 \ /
  Last update: 2021-06-22 21:23    [W:0.040 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site