lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpWpQAGKeCbga7amvg_U-AygJwqXPsfxBecSzGvTHfOf5w@mail.gmail.com>
Date:   Mon, 5 Feb 2018 10:40:05 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>, Li Shuang <shuali@...hat.com>,
        Ivan Vecera <ivecera@...hat.com>
Subject: Re: [PATCH net v3] cls_u32: fix use after free in u32_destroy_key()

On Mon, Feb 5, 2018 at 1:20 AM, Paolo Abeni <pabeni@...hat.com> wrote:
> @@ -625,6 +627,8 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
>                         idr_destroy(&ht->handle_idr);
>                         idr_remove_ext(&tp_c->handle_idr, ht->handle);
>                         RCU_INIT_POINTER(*hn, ht->next);
> +
> +                       /* the caller ensures ht->refcnt is 0 at this point */

This comment is not needed, because there is already a WARN_ON():

 608 static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
 609                              struct netlink_ext_ack *extack)
 610 {
 611         struct tc_u_common *tp_c = tp->data;
 612         struct tc_u_hnode __rcu **hn;
 613         struct tc_u_hnode *phn;
 614
 615         WARN_ON(ht->refcnt);


Other than this, looks good.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ