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>] [day] [month] [year] [list]
Date:	Sat, 02 Mar 2013 19:07:33 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Dirkjan Bussink <dirkjan.bussink@...ap.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org
Subject: Re: [PATCH] tty: Prevent deadlock in n_gsm driver

I'm looking at commit 4d9b109060f690f5c835130ff54165ae157b3087 ('tty:
Prevent deadlock in n_gsm driver') which was cc'd to stable.  This drops
the tty lock in gsm_dlci_release().

I could apply it to 3.2.y with some adjustment, but I checked the
locking context of this function and I think there's another bug to fix.
Tracing back the callers in 3.2.y I found:

gsm_dlci_release
<- gsm_cleanup_mux
   <- gsmld_detach_gsm
      <- gsmld_close
         <- tty_ldisc_close
            <- tty_set_ldisc [with tty_lock]
            <- tty_ldisc_reinit
               <- tty_ldisc_hangup [with tty_lock]
   <- gsmld_config
      <- gsmld_ioctl
         <- tty_ioctl [without tty lock]

and I think the call chains are much the same in mainline.  So
gsmld_config() presumably needs to acquire the tty lock.

Ben.

-- 
Ben Hutchings
Computers are not intelligent.	They only think they are.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ