From: akpm@linux-foundation.org
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
error27@gmail.com, astarikovskiy@suse.de
Subject: [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long
Date: Tue, 27 Apr 2010 14:06:05 -0700 [thread overview]
Message-ID: <201004272106.o3RL65Iq019661@imap1.linux-foundation.org> (raw)
From: Dan Carpenter <error27@gmail.com>
acpi_device_class can only be 19 characters and a NULL terminator.
With the current name we get a buffer overflow in acpi_smbus_hc_add()
when we do:
strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/sbshc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/acpi/sbshc.c~sbshc-acpi_device_class-smbus_host_controller-too-long drivers/acpi/sbshc.c
--- a/drivers/acpi/sbshc.c~sbshc-acpi_device_class-smbus_host_controller-too-long
+++ a/drivers/acpi/sbshc.c
@@ -18,7 +18,7 @@
#define PREFIX "ACPI: "
-#define ACPI_SMB_HC_CLASS "smbus_host_controller"
+#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
struct acpi_smb_hc {
_
next reply other threads:[~2010-04-27 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 21:06 akpm [this message]
2010-04-29 1:16 ` [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long Len Brown
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=201004272106.o3RL65Iq019661@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=astarikovskiy@suse.de \
--cc=error27@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@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