mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Daniel Drake" <dsd@gentoo.org>
Cc: "Thomas Dillig" <tdillig@stanford.edu>, linux-kernel@vger.kernel.org
Subject: Re: Null dereference errors in the kernel
Date: Tue, 18 Jul 2006 08:45:07 -0400	[thread overview]
Message-ID: <d120d5000607180545v2fa45d6nab6a5132f18a1306@mail.gmail.com> (raw)
In-Reply-To: <44BCA8CD.5070508@gentoo.org>

On 7/18/06, Daniel Drake <dsd@gentoo.org> wrote:
> Thomas Dillig wrote:
> > Hello,
> >
> > We are PhD students at Stanford University working on a static analysis
> > project called SATURN (http://glide.stanford.edu/saturn). We have
> > implemented a checker that finds potential null dereference errors and
> > ran our tool on the kernel version 2.6.17.1. We have identified around
> > 300 potential issues related to null errors, and we've included 20
> > sample reports below. If you would be interested, we can post all the
> > issues we found. Also, we apologize in advance if we aren't supposed to
> > post these error reports here, and we are happy to submit bug reports
> > elsewhere if you tell us where to post these.
>
> Interesting idea. I just looked at one of them out of curiosity, but I'm
> not sure it is valid. Either that or I have misunderstood the problem it
> is identifying?
>
> > [13]
> > 1176, 1180 drivers/char/isicom.c
> > Possible null dereference of variable "tty" checked for NULL at
> > (1183:drivers/char/isicom.c).
>
> This function is part of the tty_operations API, that would be a pretty
> broken interface if it provided the possibility of a NULL tty to work
> on. Additionally, all of the callers seem to do this:
>
>        tty->driver->put_char(tty, c);
>
> If tty is NULL here, we have larger problems at hand :)
>

That if (!tty...) check is bogus. The tool is apparently unhappy
because the code does:

struct isi_port *port = tty->driver_data;
....
if (!tty || !port->xmit_buf)
        return;

It looks like the problem is gone in the latest -git. The same issue
is in isicom_close() WRT port argument.

-- 
Dmitry

  reply	other threads:[~2006-07-18 12:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18  3:49 Thomas Dillig
2006-07-18  5:02 ` Joshua Henderson
2006-07-18  5:44   ` Thomas Dillig
2006-07-18  9:24 ` Daniel Drake
2006-07-18 12:45   ` Dmitry Torokhov [this message]
2006-07-18 14:02     ` Daniel Drake
2006-07-18 16:40 ` Dave Jones
2006-07-18 22:37   ` Peter Osterlund
2006-07-18 20:55 ` Stefan Richter
2006-07-18 21:16 ` Luiz Fernando N. Capitulino
2006-07-18 21:30   ` Andreas Schwab
2006-07-18 22:46     ` Luiz Fernando N. Capitulino

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=d120d5000607180545v2fa45d6nab6a5132f18a1306@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=dsd@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tdillig@stanford.edu \
    /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

Powered by JetHome