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-next>] [day] [month] [year] [list]
Date:	Tue, 9 Jul 2013 10:35:35 +0200
From:	Gianluca Anzolin <gianluca@...tospazio.it>
To:	jslaby@...e.cz
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Fix refcount leak in tty_port.c

Hello,

In linux 3.10 in the file drivers/tty/tty_port.c the function
tty_port_tty_hangup may leak a tty reference:

        struct tty_struct *tty = tty_port_tty_get(port);

        if (tty && (!check_clocal || !C_CLOCAL(tty))) {
                tty_hangup(tty);
                tty_kref_put(tty);
        }

If tty != NULL and the second condition is false we never call tty_kref_put and
the reference is leaked.

Fix by nesting two if statements.

Signed-off-by: Gianluca Anzolin <gianluca@...tospazio.it>

View attachment "tty_port.patch" of type "text/x-diff" (466 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ