All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Dmitry Torokhov <dtor_core@ameritech.net>,
	Kay Sievers <kay.sievers@vrfy.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: uevent buffer overflow in input layer
Date: Mon, 23 Jan 2006 22:07:41 -0800	[thread overview]
Message-ID: <20060124060741.GA23869@kroah.com> (raw)
In-Reply-To: <200601240101.21238.dtor_core@ameritech.net>

On Tue, Jan 24, 2006 at 01:01:19AM -0500, Dmitry Torokhov wrote:
> On Tuesday 24 January 2006 00:03, Greg KH wrote:
> > On Mon, Jan 23, 2006 at 10:43:41AM +1100, Benjamin Herrenschmidt wrote:
> > > Current -git as of today does this on an x86 box with a logitech USB
> > > keyboard:
> > > 
> > > (the $$$ is debug stuff I added to print_modalias(), size is the size
> > > passed in and "Total len" is the value of "len" before returning). We
> > > end up overflowing, thus we pass a negative size to snprintf which
> > > causes the WARN_ON. Bumping the uevent buffer size in lib/kobject_uevent.c
> > > from 1024 to 2048 seems to fix the oops and /dev/input/mice is now properly
> > > created and works (it doesn't without the fix, X fails and we end up back
> > > in console with a dead keyboard).
> > > 
> > > I'm not sure it's the correct solution as I'm not too familiar with the
> > > uevent code though, so I'll let you guys decide on the proper approach.
> > 
> > Yes, input has some big strings, I'd recommend bumping it up like you
> > suggest.
> > 
> > Care to make up a patch as you found the problem and should get the
> > credit?  :)
> > 
> 
> Actually, is it too late to convert modalias data to the same format
> (bitmap) we are using in /proc/bus/input/devices (keeping cutting key
> info at KEY_MIN_INTERESTING)? It looks like it will be more compact
> and let us keep 1024 bytes buffer...

I don't think so, but Kay knows best about this.  Kay?

thanks,

greg k-h

  reply	other threads:[~2006-01-24  6:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-22 23:43 uevent buffer overflow in input layer Benjamin Herrenschmidt
2006-01-24  5:03 ` Greg KH
2006-01-24  6:01   ` Dmitry Torokhov
2006-01-24  6:07     ` Greg KH [this message]
2006-01-24 10:58       ` Kay Sievers
2006-01-24 23:21         ` Benjamin Herrenschmidt

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=20060124060741.GA23869@kroah.com \
    --to=greg@kroah.com \
    --cc=benh@kernel.crashing.org \
    --cc=dtor_core@ameritech.net \
    --cc=kay.sievers@vrfy.org \
    --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 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.