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: <20160113.114634.1483349324408375191.davem@davemloft.net>
Date:	Wed, 13 Jan 2016 11:46:34 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	dvyukov@...gle.com
Cc:	linux-x25@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, peter@...leysoftware.com,
	gregkh@...uxfoundation.org, jslaby@...e.com,
	syzkaller@...glegroups.com, kcc@...gle.com, glider@...gle.com,
	sasha.levin@...cle.com, edumazet@...gle.com
Subject: Re: memory leak in lapb_create_cb

From: Dmitry Vyukov <dvyukov@...gle.com>
Date: Wed, 30 Dec 2015 22:00:44 +0100

> The following program leads to a leak of struct lapb_cb:

I looked into this report a bit, and although I couldn't figure out
how lapb_cb could be leaked, I definitely found an x25_asy object
leak in this driver.

====================
[PATCH] x25_asy: Free x25_asy on x25_asy_open() failure.

Based upon a report by Dmitry Vyukov.

Signed-off-by: David S. Miller <davem@...emloft.net>
---
 drivers/net/wan/x25_asy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index cd39025..1bc5e93 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -571,8 +571,10 @@ static int x25_asy_open_tty(struct tty_struct *tty)
 
 	/* Perform the low-level X.25 async init */
 	err = x25_asy_open(sl->dev);
-	if (err)
+	if (err) {
+		x25_asy_free(sl);
 		return err;
+	}
 	/* Done.  We have linked the TTY line to a channel. */
 	return 0;
 }
-- 
2.1.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ