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: <20130731091746.Horde.du1olpir309R_TiqC-MWNuA@imap.linux.ibm.com>
Date:	Wed, 31 Jul 2013 09:17:46 -0700
From:	Zach Levis <zml@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk, Zach Levis <zach@...hsthings.com>
Subject: Re: [PATCH 2/3] fs/binfmts: Better handling of binfmt loops


Quoting Andrew Morton <akpm@...ux-foundation.org>:

> On Tue, 30 Jul 2013 16:16:51 -0700 Zach Levis <zml@...ux.vnet.ibm.com> wrote:
>
>>
>> Quoting Andrew Morton <akpm@...ux-foundation.org>:
>>
>> > On Thu, 25 Jul 2013 08:40:44 -0700 Zach Levis  
>> <zml@...ux.vnet.ibm.com> wrote:
>> >
>> >> With these changes, when a binfmt loop is encountered,
>> >> the ELOOP will propogate back to the 0 depth. At this point the
>> >> argv and argc values will be reset to what they were originally and an
>> >> attempt is made to continue with the following binfmt handlers.
>> >
>> > hm, why?  What problem does this fix?  What value does the change offer
>> > to our users?
>>
>> This is used when the binfmt_misc,script,etc options are configured in
>> a way that would previously prevent executables from launching that
>> could be executed with a different binfmt but don't because of a loop
>> in a prior binfmt.
>>
>> Example: a qemu is configured to run 64-bit ELFs on an otherwise
>> 32-bit system. The system's owner switches to running with 64-bit
>> executables, but forgets to disable the binfmt_misc option that
>> redirects 64bit ELFs to qemu. Since the qemu executable is a 64-bit
>> ELF now, binfmt_misc keeps on matching it with the qemu rule,
>> preventing the execution of any 64-bit binary.
>
> So the admin can unforget to make that change and no longer has a problem.
>
>> With this patch, an error is printed and search_binary_handler()
>> continues on to the next handler, allowing the original executable to
>> run normally so the user can (hopefully) fix their misconfiguration
>> more easily.
>
> Is all this really worth changing the kernel for?  It sounds
> a bit marginal.
I'd say it is worth changing because this is a self-contained fix that  
doesn't have much in the way of side effects for normal execution but  
can help recover a system. Apart from storing a pointer to the  
provided arguments, the only changes this requires are in the code for  
error handling.


--
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