public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Tycho Andersen <tycho@tycho.ws>
Cc: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Subject: Re: null dereference in binfmt misc
Date: Tue, 10 Oct 2017 14:04:02 +0200	[thread overview]
Message-ID: <20171010120402.GA32446@redhat.com> (raw)
In-Reply-To: <20171010111647.GA27310@redhat.com>

On 10/10, Oleg Nesterov wrote:
>
> On 10/09, Tycho Andersen wrote:
> > Hi,
> >
> > It looks like eb23aa031 ("exec: binfmt_misc: remove the confusing
> > e->interp_file != NULL checks") uncovered a bug for me (see the trace below,
> > which I'm afraid isn't very helpful).
>
> Well, I think this commit uncovered the fact I am stupid, although there is
> nothing new. I forgot about iput() in bm_register_write's error paths, it can
> be called with MISC_FMT_OPEN_FILE && interp_file == NULL.
>
> I'll try to cleanup bm_register_write() to make this impossible, or perhaps
> I will just restore the interp_file != NULL check in evict.

Yes, but...

> Before that, could you please try the debugging patch below? To ensure you
> didn't hit another problem.

please ignore. scripts/decodecode suggests you hit another problem,
inode->i_private is NULL.

I'll send the patch today, thanks.

Oleg.

      reply	other threads:[~2017-10-10 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 21:19 null dereference in binfmt misc Tycho Andersen
2017-10-10  6:49 ` Santosh Sivaraj
2017-10-10 11:16 ` Oleg Nesterov
2017-10-10 12:04   ` Oleg Nesterov [this message]

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=20171010120402.GA32446@redhat.com \
    --to=oleg@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tycho@tycho.ws \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox