lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Aug 2020 11:26:24 +0800
From:   Tonghao Zhang <>
To:     Cong Wang <>
Cc:     "Paul E . McKenney" <>,
        Joel Fernandes <>,
        Johan Knöös <>,
        Gregory Rose <>,
        bugs <>, Netdev <>,
        "Uladzislau Rezki (Sony)" <>,
        rcu <>
Subject: Re: [ovs-discuss] Double free in recent kernels after memleak fix

On Tue, Aug 11, 2020 at 10:24 AM Cong Wang <> wrote:
> On Mon, Aug 10, 2020 at 6:16 PM Tonghao Zhang <> wrote:
> > Hi all, I send a patch to fix this. The rcu warnings disappear. I
> > don't reproduce the double free issue.
> > But I guess this patch may address this issue.
> >
> >
> I don't see how your patch address the double-free, as we still
> free mask array twice after your patch: once in tbl_mask_array_realloc()
> and once in ovs_flow_tbl_destroy().
Hi Cong.
Before my patch, we use the ovsl_dereference
(rcu_dereference_protected) in the rcu callback.
ASSERT_OVSL(will print warning)
ovsl_dereference(rcu usage warning)

so we should invoke the table_instance_destroy or others under
ovs_lock to avoid (ASSERT_OVSL and rcu usage warning).
with this patch, we reallocate the mask_array under ovs_lock, and free
it in the rcu callback. Without it, we  reallocate and free it in the
rcu callback.
I think we may fix it with this patch.

> Have you tried my patch which is supposed to address this double-free?
I don't reproduce it. but your patch does not avoid ruc usage warning
> It simply skips the reallocation as it makes no sense to trigger reallocation
> when destroying it.
> Thanks.

Best regards, Tonghao

Powered by blists - more mailing lists