Re: Userspace regression in LTS and stable kernels

2019-02-18 Thread Michal Hocko
On Fri 15-02-19 13:00:26, Sasha Levin wrote: > On Fri, Feb 15, 2019 at 04:52:00PM +0100, Michal Hocko wrote: > > On Fri 15-02-19 10:19:12, Sasha Levin wrote: > > > On Fri, Feb 15, 2019 at 10:42:05AM +0100, Michal Hocko wrote: > > > > On Fri 15-02-19 10:20:13, Greg KH wrote: > > > > > On Fri, Feb 15

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Sasha Levin
On Fri, Feb 15, 2019 at 04:52:00PM +0100, Michal Hocko wrote: On Fri 15-02-19 10:19:12, Sasha Levin wrote: On Fri, Feb 15, 2019 at 10:42:05AM +0100, Michal Hocko wrote: > On Fri 15-02-19 10:20:13, Greg KH wrote: > > On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: > > > On Fri 15-02

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Sasha Levin
On Fri, Feb 15, 2019 at 11:18:30AM -0500, Samuel Dionne-Riel wrote: I'm sorry to interject here, but the issue was reported on the Kernel.org Bugzilla on February 2nd - https://bugzilla.kernel.org/show_bug.cgi?id=202497 In the interest of better communication, if the need arises again, how shou

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Samuel Dionne-Riel
On 15/02/2019, Michal Hocko wrote: > On Fri 15-02-19 10:19:12, Sasha Levin wrote: >> On Fri, Feb 15, 2019 at 10:42:05AM +0100, Michal Hocko wrote: >> > On Fri 15-02-19 10:20:13, Greg KH wrote: >> > > On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: >> > > > On Fri 15-02-19 08:00:22, G

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Michal Hocko
On Fri 15-02-19 10:19:12, Sasha Levin wrote: > On Fri, Feb 15, 2019 at 10:42:05AM +0100, Michal Hocko wrote: > > On Fri 15-02-19 10:20:13, Greg KH wrote: > > > On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: > > > > On Fri 15-02-19 08:00:22, Greg KH wrote: > > > > > On Thu, Feb 14, 20

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Sasha Levin
On Fri, Feb 15, 2019 at 10:42:05AM +0100, Michal Hocko wrote: On Fri 15-02-19 10:20:13, Greg KH wrote: On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: > On Fri 15-02-19 08:00:22, Greg KH wrote: > > On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > > > On Thu, 14 Feb

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Michal Hocko
On Fri 15-02-19 10:20:13, Greg KH wrote: > On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: > > On Fri 15-02-19 08:00:22, Greg KH wrote: > > > On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > > > > On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds > > > > wrote: > > >

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Greg Kroah-Hartman
On Fri, Feb 15, 2019 at 10:10:00AM +0100, Michal Hocko wrote: > On Fri 15-02-19 08:00:22, Greg KH wrote: > > On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > > > On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds > > > wrote: > > > > > > > On Wed, Feb 13, 2019 at 3:37 PM Richard W

Re: Userspace regression in LTS and stable kernels

2019-02-15 Thread Michal Hocko
On Fri 15-02-19 08:00:22, Greg KH wrote: > On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > > On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds > > wrote: > > > > > On Wed, Feb 13, 2019 at 3:37 PM Richard Weinberger > > > wrote: > > > > > > > > Your shebang line exceeds BINPRM_B

Re: Userspace regression in LTS and stable kernels

2019-02-14 Thread Greg Kroah-Hartman
On Fri, Feb 15, 2019 at 08:00:22AM +0100, Greg Kroah-Hartman wrote: > On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > > On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds > > wrote: > > > > > On Wed, Feb 13, 2019 at 3:37 PM Richard Weinberger > > > wrote: > > > > > > > > Your sh

Re: Userspace regression in LTS and stable kernels

2019-02-14 Thread Greg Kroah-Hartman
On Thu, Feb 14, 2019 at 12:20:27PM -0800, Andrew Morton wrote: > On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds > wrote: > > > On Wed, Feb 13, 2019 at 3:37 PM Richard Weinberger > > wrote: > > > > > > Your shebang line exceeds BINPRM_BUF_SIZE. > > > Before the said commit the kernel silently

Re: Userspace regression in LTS and stable kernels

2019-02-14 Thread Andrew Morton
On Thu, 14 Feb 2019 09:56:46 -0800 Linus Torvalds wrote: > On Wed, Feb 13, 2019 at 3:37 PM Richard Weinberger > wrote: > > > > Your shebang line exceeds BINPRM_BUF_SIZE. > > Before the said commit the kernel silently truncated the shebang line > > (and corrupted it), > > now it tells the user t

Re: Userspace regression in LTS and stable kernels

2019-02-14 Thread Linus Torvalds
On Wed, Feb 13, 2019 at 3:37 PM Richard Weinberger wrote: > > Your shebang line exceeds BINPRM_BUF_SIZE. > Before the said commit the kernel silently truncated the shebang line > (and corrupted it), > now it tells the user that the line is too long. It doesn't matter if it "corrupted" things by t

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Samuel Dionne-Riel
On 13/02/2019, Kees Cook wrote: > The original problem that was trying to be fixed here was to disallow > execution of a truncated interpreter path. It was assumed argument > truncate was just as bad, but it's not, since the interpreter can (and > does!) re-read the script to get the right argumen

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Kees Cook
On Wed, Feb 13, 2019 at 5:27 PM Samuel Dionne-Riel wrote: > If I understand right, you're asking whether it should return NOEXEC > if, of the first 128 bytes of the shebang, there are no spaces, but a > too long shebang? I wouldn't know for sure. The behaviour would > change. Instead failing due t

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Samuel Dionne-Riel
On 13/02/2019, Kees Cook wrote: > On Wed, Feb 13, 2019 at 4:41 PM Samuel Dionne-Riel > wrote: >> Before, the interpreter was still used (assuming it wasn't cut by the >> length), and the interpreter was free to re-read the shebang if >> desired. > > So, to address the "wrong binary" problem, how

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Kees Cook
On Wed, Feb 13, 2019 at 4:41 PM Samuel Dionne-Riel wrote: > Before, the interpreter was still used (assuming it wasn't cut by the > length), and the interpreter was free to re-read the shebang if > desired. Oh awesome. Yeah, so, nevermind about the WARN_ONCE(). So, to address the "wrong binary"

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Kees Cook
On Wed, Feb 13, 2019 at 3:36 PM Richard Weinberger wrote: > > [CC'in relevant folks] > > On Thu, Feb 14, 2019 at 12:19 AM Samuel Dionne-Riel > wrote: > > > > Hi, > > > > I am posting as a representative of the NixOS Linux distribution, > > about a userspace regression on 5.0-rc* which recently wa

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Samuel Dionne-Riel
Thanks for CC'ing relevant folks. On 13/02/2019, Richard Weinberger wrote: > [CC'in relevant folks] > > On Thu, Feb 14, 2019 at 12:19 AM Samuel Dionne-Riel > wrote: >> >> Here is an example shebang causing an issue: >> >> #! /nix/store/mbwav8kz8b3y471wjsybgzw84mrh4js9-perl-5.28.1/bin/perl >> -I/

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Richard Weinberger
[CC'in relevant folks] On Thu, Feb 14, 2019 at 12:19 AM Samuel Dionne-Riel wrote: > > Hi, > > I am posting as a representative of the NixOS Linux distribution, > about a userspace regression on 5.0-rc* which recently was backported > to the 4.14.99, 4.19.21 and 4.20.8 current LTS and stable versi

Re: Userspace regression in LTS and stable kernels

2019-02-13 Thread Samuel Dionne-Riel
Sorry, had an issue when sending the e-mail and lost a bit of context at the end, here's the missing bit: --- [...] Note: I wish to be CC'ed for answers and comments as I am not subscribed to the mailing list, thanks. References: * NixOS bug 53672, https://github.com/NixOS/nixpkgs/issues/53672