From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Date: Fri, 19 Mar 2010 12:25:45 +0000 Subject: Re: [patch] acpi_pad: "processor_aggregator" name too long Message-Id: <4BA36D49.7080703@bfs.de> List-Id: References: <20100319114806.GN5331@bicker> In-Reply-To: <20100319114806.GN5331@bicker> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter , Shaohua Li , Len Brown , Andrew Morton , Chen Gong , Peter Zijlstra , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Dan Carpenter schrieb: > cpi_device_class can only be 19 characters and a NULL terminator. > > With the current name we get a buffer overflow in acpi_pad_add() > strcpy(acpi_device_class(device), ACPI_PROCESSOR_AGGREGATOR_CLASS); > > Signed-off-by: Dan Carpenter > --- > Feel free to pick your own name if you don't like mine. :) > > > diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c > index 7e52295..2db89d9 100644 > --- a/drivers/acpi/acpi_pad.c > +++ b/drivers/acpi/acpi_pad.c > @@ -30,7 +30,7 @@ > #include > #include > > -#define ACPI_PROCESSOR_AGGREGATOR_CLASS "processor_aggregator" > +#define ACPI_PROCESSOR_AGGREGATOR_CLASS "proc_aggregator" > #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" > #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 > static DEFINE_MUTEX(isolated_cpus_lock); Hi Dan, IMHO this does not solve the core problem. acpi should use kstrncpy or better a pointer. The next guy that use "my_great_indentifier_is_longer_than_yours" will cause the same problem. But this is something that the acpi group needs to answer (fast). re, wh