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: <913f7fe1d895bc5b80b42e92304d086c6a550193.camel@mellanox.com>
Date:   Thu, 30 Jul 2020 23:18:10 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "songliubraving@...com" <songliubraving@...com>,
        "hawk@...nel.org" <hawk@...nel.org>, "kafai@...com" <kafai@...com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kpsingh@...omium.org" <kpsingh@...omium.org>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>,
        "leon@...nel.org" <leon@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "xiongx18@...an.edu.cn" <xiongx18@...an.edu.cn>,
        "yhs@...com" <yhs@...com>, "andriin@...com" <andriin@...com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Tariq Toukan <tariqt@...lanox.com>
CC:     "xiyuyang19@...an.edu.cn" <xiyuyang19@...an.edu.cn>,
        "tanxin.ctf@...il.com" <tanxin.ctf@...il.com>,
        "yuanxzhang@...an.edu.cn" <yuanxzhang@...an.edu.cn>
Subject: Re: [PATCH v2] net/mlx5e: fix bpf_prog reference count leaks in
 mlx5e_alloc_rq

On Thu, 2020-07-30 at 18:29 +0800, Xin Xiong wrote:
> The function invokes bpf_prog_inc(), which increases the reference
> count of a bpf_prog object "rq->xdp_prog" if the object isn't NULL.
> 
> The refcount leak issues take place in two error handling paths. When
> either mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the
> function
> simply returns the error code and forgets to drop the reference count
> increased earlier, causing a reference count leak of "rq->xdp_prog".
> 
> Fix this issue by jumping to the error handling path
> err_rq_wq_destroy
> while either function fails.
> 
> Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ objects for different
> RQ
> types")
> 

Please don't break the line of the fixes tag.
I will fix this up.

> Signed-off-by: Xin Xiong <xiongx18@...an.edu.cn>
> Signed-off-by: Xiyu Yang <xiyuyang19@...an.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@...il.com>
> ---
> v1 -> v2:
> - Amended parts of wording to be better understood
> - Added Fixes tag
> ---

Applied to net-mlx5, Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ