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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5238BBF3.5020504@hurleysoftware.com>
Date:	Tue, 17 Sep 2013 16:30:43 -0400
From:	Peter Hurley <peter@...leysoftware.com>
To:	Carlos O'Donell <carlos@...hat.com>
CC:	Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	codonell <codonell@...hat.com>, Eduard Benes <ebenes@...hat.com>,
	Karel Srot <ksrot@...hat.com>,
	Matt Newsome <mnewsome@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] tty: disassociate_ctty() sends the extra SIGCONT

On 09/17/2013 03:41 PM, Carlos O'Donell wrote:
> On 09/16/2013 06:16 PM, Peter Hurley wrote:
>> On 09/15/2013 11:50 AM, Oleg Nesterov wrote:
>>> Starting from v3.10 (probably f91e2590 "tty: Signal foreground
>>> group processes in hangup") disassociate_ctty() sends SIGCONT
>>> if tty && on_exit. This breaks LSB test-suite, in particular
>>> test8 in _exit.c and test40 in sigcon5.c.
>>>
>>> Put the "!on_exit" check back to restore the old behaviour.
>>>
>>> Cc: stable@...r.kernel.org # v3.10+
>>> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>>> Reported-by: Karel Srot <ksrot@...hat.com>
>>
>> Although I confirmed your results with a new unit test,
>> I'd like to review the source code for the reported tests.
>> Where can grab the source for the LSB tests, _exit.c and sigcon5.c?
>> Direct links would be appreciated.
>
> wget ftp://ftp.linuxfoundation.org/pub/lsb/test_suites/released-4.1/source/runtime/lsb-test-core-4.1.15-1.src.rpm
> rpm2cpio lsb-test-core-4.1.15-1.src.rpm | cpio -idmv
> tar zxvf lsb-test-core-4.1.15.tar.gz
> tar zxvf lts_vsx-pcts-4.1.15.tgz
>
> Source is at:
> ./tset/POSIX.os/procprim/_exit/_exit.c
> ./tset/POSIX.os/procprim/sigconcept/sigcon5.c

Hi Carlos,

Thanks for the links.

> In all failures the tests are checking for SIGHUP to be sent
> to a foreground process. It would appear that the additional
> signal confuses the test.
>
> Exactly what semantics should be followed do not seem to be
> clearly covered by any standards.
>
> Therefore it is likely just as valid to say that the LSB tests
> need to be more robust in the face of the additional signal.
>
> I have little experience when it comes this particular area
> of the kernel or expected behaviour from other OSs.

The _exit.c:test8() and sigcon5.c:test40() look correct to me.
The fact that they are fragile IMO is a good thing; I could
easily envision an app's signal handling being equally fragile.

Although SUSv3 & v4 don't preclude the extra SIGCONT, in this specific case,
a pty should receive the same signals, in the same order as a regular tty.

Thanks again,
Peter Hurley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ