All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: syzbot 
	<bot+57840b4d2cc5c46981d5b9e07c9b7b06d5bcf064@syzkaller.appspotmail.com>,
	jslaby@suse.com, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: kernel panic: n_tty: init_tty
Date: Mon, 6 Nov 2017 09:26:04 -0800	[thread overview]
Message-ID: <20171106172604.GB50562@gmail.com> (raw)
In-Reply-To: <20171106123309.GA14071@kroah.com>

On Mon, Nov 06, 2017 at 01:33:09PM +0100, Greg KH wrote:
> > 
> > I just saw the same crash running syzkaller.  It was preceded by a fault
> > injection in tty_ldisc_get() here:
> > 
> >         ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL);
> >         if (ld == NULL) {
> >                 put_ldops(ldops);
> >                 return ERR_PTR(-ENOMEM);
> >         }
> > 
> > So then it panics at:
> > 
> >         if (IS_ERR(ld))
> >                 panic("n_tty: init_tty");
> > 
> > It seems that syzkaller needs to do a better job reproducing and reporting bugs
> > that are only reproducible with fault injection.  But either way, this is a bug;
> > panic() is not an acceptable way of handling kmalloc failure.
> 
> That's a well-known issue, it's pretty much impossible to unwind safely
> from here.  If you don't have enough memory at boot to get a tty_ldisc,
> you have bigger problems.
> 
> thanks,
> 
> greg k-h

It's not just running at boot though.  It's also being hit by the fuzzer at
runtime, via ptmx_open().

Eric

  reply	other threads:[~2017-11-06 17:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <94eb2c0630b4161a5e055d38a2e3@google.com>
2017-11-05 10:34 ` kernel panic: n_tty: init_tty Greg KH
2017-11-05 22:04   ` Eric Biggers
2017-11-06 12:14     ` Dmitry Vyukov
2017-11-06 12:37       ` Greg KH
2017-11-06 12:33     ` Greg KH
2017-11-06 17:26       ` Eric Biggers [this message]
2017-11-07 10:37         ` Dmitry Vyukov
2017-11-07 17:18         ` Alan Cox
2017-11-06 12:13   ` Dmitry Vyukov
2018-04-05 10:40   ` [PATCH] tty: Don't call panic() at tty_ldisc_init() Tetsuo Handa
2018-04-25 11:04     ` kernel panic: n_tty: init_tty Tetsuo Handa
2017-12-29  8:32 ` syzbot

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=20171106172604.GB50562@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=bot+57840b4d2cc5c46981d5b9e07c9b7b06d5bcf064@syzkaller.appspotmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /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.