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]
Date:   Mon, 6 Nov 2017 06:54:27 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Alan Cox <alan@...yncelyn.cymru>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [BUG] tty: Userland can create hung tasks

Hello, Alan.

On Wed, Nov 01, 2017 at 05:09:08PM +0000, Alan Cox wrote:
> On Tue, 31 Oct 2017 19:06:51 -0700
> Tejun Heo <tj@...nel.org> wrote:
> 
> > Hello,
> > 
> > tty hangup code doesn't mark the console as being HUPed for, e.g.,
> > /dev/console and that can put the session leader trying to
> > disassociate from the controlling terminal in an indefinite D sleep.
> > 
> > Looking at the code, I have no idea why some tty devices are never
> > marked being hung up.  It *looks* intentional and dates back to the
> > git origin but I couldn't find any clue.  The following patch is a
> > workaround which fixes the observed problem but definitely isn't the
> > proper fix.
> 
> Two reasons
> 
> 1. It broke the serial consoles because they would hang up and close down
> the hardware. With tty_port that *should* be fixable properly for any
> cases remaining.
> 
> 2. The console layer was (and still is) completely broken and doens't
> refcount properly. So if you turn on console hangups it breaks (as indeed
> does freeing consoles and half a dozen other things).
> 
> Sadly it seems that nobody cares about the console.

Hmm... so, does something like the posted workaround look reasonable
to you?  It doesn't fix the actual hangup issue but gets rid of
processes getting stuck in D sleep indefinitely.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ