mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Ben Gardner <gardner.ben@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: FW: [PATCH] cs5535_gpio: Fix root triggerable integer underflow
Date: Fri, 24 Jul 2009 21:00:55 +0200	[thread overview]
Message-ID: <200907242100.56097.mb@bu3sch.de> (raw)
In-Reply-To: <808c8e9d0907241040i2783d27aw948aa239f521336c@mail.gmail.com>

On Friday 24 July 2009 19:40:28 Ben Gardner wrote:
> Hi Michael,
> 
> > This patch fixes a possible root triggerable (I hope the device is only
> > readable by root?) integer underflow.
> > Well, it's not really an underflow, but as loff_t is a signed type, the
> > range check at the start of the function is incomplete. It needs to
> > check for <0, too.
> > Otherwise the loop below will poke into random memory and I/O space.
> > This could be used to crash the machine, at least.
> >
> > This patch is only compiletested, because I do not have the hardware.
> >
> > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> >
> > ---
> >
> > I'm not sure if this bug is exploitable. I _guess_ the device is only
> > readable by root
> > on a standard setup.
> 
> The cs5525_gpio driver uses the default seek, which doesn't allow
> negative position values.
> So, I don't think it necessary to check for negative values.

Yes you are right.

-- 
Greetings, Michael.

      reply	other threads:[~2009-07-24 19:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F06EB2894F3F0D45AD9BEA7246DE9C900E542FE2@WCSEXCMBS1.ad.wabtec.com>
2009-07-24 17:40 ` Ben Gardner
2009-07-24 19:00   ` Michael Buesch [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=200907242100.56097.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=gardner.ben@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®