From: Chuck Ebbert <76306.1226@compuserve.com>
To: Horst Schirmeier <horst@schirmeier.com>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
Vojtech Pavlik <vojtech@suse.cz>,
Kay Sievers <kay.sievers@suse.de>
Subject: Re:Badness in vsnprintf
Date: Sun, 26 Feb 2006 08:05:05 -0500 [thread overview]
Message-ID: <200602260806_MC3-1-B956-121A@compuserve.com> (raw)
In-Reply-To: <20060126195038.GB22994@quickstop.soohrt.org>
On Thu, 26 Jan 2006 at 20:50:38 +0100, Horst Schirmeier wrote:
> input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:04.2-1
> Badness in vsnprintf at lib/vsprintf.c:279
> [<c0324f64>] vsnprintf+0x544/0x550
> [<c0324fbc>] snprintf+0x1c/0x30
> [<c03ec17a>] print_modalias_bits+0x8a/0x90
> [<c03ec213>] print_modalias+0x93/0x1d0
> [<c03ec8c0>] input_dev_uevent+0x1d0/0x4b0
> [<c0384060>] class_uevent+0xb0/0x260
> [<c0383fb0>] class_uevent+0x0/0x260
> [<c03223f1>] kobject_uevent+0x3f1/0x450
print_modalias() passed a negative length to snprintf().
There's a general lack of error checking in the whole area;
input_dev_uevent() does:
envp[i++] = buffer + len;
len += snprintf(buffer + len, buffer_size - len, "MODALIAS=");
len += print_modalias(buffer + len, buffer_size - len, dev) + 1;
envp[i] = NULL;
and never checks whether 'buffer_size - len' is negative or even if there
is space in envp[] for another pointer. And print_modalias() and
print_modalias_bits() don't check anything either.
Maybe the modalias shouldn't be in there at all since there doesn't seem to
be enough space for it?
--
Chuck
"Equations are the Devil's sentences." --Stephen Colbert
reply other threads:[~2006-02-26 13:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200602260806_MC3-1-B956-121A@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=dtor_core@ameritech.net \
--cc=horst@schirmeier.com \
--cc=kay.sievers@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).