[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202005121625.20B35A3@keescook>
Date: Tue, 12 May 2020 16:47:14 -0700
From: Kees Cook <keescook@...omium.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>, Jann Horn <jannh@...gle.com>,
Greg Ungerer <gerg@...ux-m68k.org>,
Rob Landley <rob@...dley.net>,
Bernd Edlinger <bernd.edlinger@...mail.de>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Casey Schaufler <casey@...aufler-ca.com>,
LSM List <linux-security-module@...r.kernel.org>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH 3/5] exec: Remove recursion from search_binary_handler
On Tue, May 12, 2020 at 04:08:56PM -0700, Kees Cook wrote:
> I'm nearly certain the answer is "yes", but I wonder if we should stop
> for a moment and ask "does anything still use MISC_FMT_OPEN_BINARY ? It
> looks like either "O" or "C" binfmt_misc registration flag. My installed
> binfmts on Ubuntu don't use them...
>
> I'm currently pulling a list of all the packages in Debian than depend
> on the binfmt-support package and checking their flags.
So, binfmt-support in Debian doesn't in _support_ MISC_FMT_OPEN_BINARY
("O"):
credentials =
(binfmt->credentials && !strcmp (binfmt->credentials, "yes"))
? "C" : "";
preserve = (binfmt->preserve && !strcmp (binfmt->preserve, "yes"))
? "P" : "";
fix_binary =
(binfmt->fix_binary && !strcmp (binfmt->fix_binary, "yes"))
? "F" : "";
...
regstring = xasprintf (":%s:%c:%s:%s:%s:%s:%s%s%s\n",
name, type, binfmt->offset, binfmt->magic,
binfmt->mask, interpreter,
credentials, preserve, fix_binary);
However, "credentials" ("C") does imply MISC_FMT_OPEN_BINARY.
I looked at every Debian package using binfmt-support, and "only" qemu
uses "credential".
And now I wonder if qemu actually uses the resulting AT_EXECFD ...
--
Kees Cook
Powered by blists - more mailing lists