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  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]
Date:   Mon, 27 Apr 2020 11:20:54 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     xiyuyang19@...an.edu.cn
Cc:     andrew.hendry@...il.com, kuba@...nel.org, tanxin.ctf@...il.com,
        gregkh@...uxfoundation.org, allison@...utok.net,
        tglx@...utronix.de, linux-x25@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        yuanxzhang@...an.edu.cn, kjlu@....edu
Subject: Re: [PATCH v2] net/x25: Fix x25_neigh refcnt leak when x25
 disconnect

From: Xiyu Yang <xiyuyang19@...an.edu.cn>
Date: Sat, 25 Apr 2020 21:06:25 +0800

> x25_connect() invokes x25_get_neigh(), which returns a reference of the
> specified x25_neigh object to "x25->neighbour" with increased refcnt.
> 
> When x25 connect success and returns, the reference still be hold by
> "x25->neighbour", so the refcount should be decreased in
> x25_disconnect() to keep refcount balanced.
> 
> The reference counting issue happens in x25_disconnect(), which forgets
> to decrease the refcnt increased by x25_get_neigh() in x25_connect(),
> causing a refcnt leak.
> 
> Fix this issue by calling x25_neigh_put() before x25_disconnect()
> returns.
> 
> Signed-off-by: Xiyu Yang <xiyuyang19@...an.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@...il.com>

Applied.

Powered by blists - more mailing lists