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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200729.132842.190888844026802233.davem@davemloft.net>
Date:   Wed, 29 Jul 2020 13:28:42 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     saeedm@...lanox.com
Cc:     songliubraving@...com, hawk@...nel.org, kafai@...com,
        kpsingh@...omium.org, john.fastabend@...il.com, leon@...nel.org,
        linux-kernel@...r.kernel.org, ast@...nel.org,
        linux-rdma@...r.kernel.org, xiongx18@...an.edu.cn, yhs@...com,
        andriin@...com, kuba@...nel.org, daniel@...earbox.net,
        bpf@...r.kernel.org, netdev@...r.kernel.org,
        xiyuyang19@...an.edu.cn, tanxin.ctf@...il.com,
        yuanxzhang@...an.edu.cn
Subject: Re: [PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

From: Saeed Mahameed <saeedm@...lanox.com>
Date: Wed, 29 Jul 2020 19:02:15 +0000

> On Wed, 2020-07-29 at 20:33 +0800, Xin Xiong wrote:
>> The function invokes bpf_prog_inc(), which increases the refcount 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
>> mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function
>> simply
>> returns the error code and forgets to drop the refcount increased
>> earlier, causing a refcount leak of "rq->xdp_prog".
>> 
>> Fix this issue by jumping to the error handling path
>> err_rq_wq_destroy
>> when either function fails.
>> 
> 
> Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ objects for different RQ
> types")

Saeed, are you going to take this into your tree or would you like me to
apply it directly?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ