From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] binfmt_misc.c: avoid potential kernel stack overflow
Date: Mon, 18 Aug 2008 17:44:19 +0300 [thread overview]
Message-ID: <20080818144418.GA4818@localhost.localdomain> (raw)
In-Reply-To: <48A98293.5080109@openvz.org>
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
On Mon, Aug 18, 2008 at 06:09:23PM +0400, Pavel Emelyanov wrote:
> (Put lkml in Cc. The original message is beyond)
>
> Oops! My fault. The problem is that in case of modularized binfmt,
> the appropriate binary handler gets registered _before_ the script
> one and sets the misc_bang flag even too early.
>
> Thus when we launch a script the load_misc_binary sets this bang,
> then returns error, since the binary is actually a script, then the
> load_script_binary successfully loads the script, then it loads the
> misc binary again, which exits with the -ENOEXEC error due to bang
> set.
>
> This patch helped my box, what about yours?
It works. Thank you.
Reported-and-tested-by: Kirill A. Shutemov <kirill@shutemov.name>
I have noticed yet another problem: more than one bit of sh_bang can be
used on alpha:
fs/exec.c
1189 return retval;
1190
1191 /* Remember if the application is TASO. */
1192 bprm->sh_bang = eh->ah.entry < 0x100000000UL;
1193
1194 bprm->file = file;
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-08-18 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080818112849.GA4951@localhost.localdomain>
2008-08-18 14:09 ` [PATCH] binfmt_misc.c: avoid potential kernel stack overflow Pavel Emelyanov
2008-08-18 14:44 ` Kirill A. Shutemov [this message]
2008-08-18 14:51 ` Kirill A. Shutemov
2008-08-18 23:20 ` Andrew Morton
2008-08-19 10:08 ` Pavel Emelyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080818144418.GA4818@localhost.localdomain \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.