Re: [PATCH 05/14] ACPICA: Debugger: Prevent possible command line buffer overflow.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2013 at 4:54 AM, Lv Zheng <lv.zheng@xxxxxxxxx> wrote:
> From: Bob Moore <robert.moore@xxxxxxxxx>
>
> Increase the size of a couple of the debugger line buffers.
> ACPICA BZ 1037.
>
> Buglink: http://bugs.acpica.org/show_bug.cgi?id=1037
> Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
> Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
> ---
>  drivers/acpi/acpica/acglobal.h |   17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
> index 90e846f..c9ad2e1 100644
> --- a/drivers/acpi/acpica/acglobal.h
> +++ b/drivers/acpi/acpica/acglobal.h
> @@ -445,13 +445,6 @@ ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
>  ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
>  ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
>  ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support;
> -
> -ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
> -ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
> -ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE];
> -ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE];
> -ACPI_EXTERN char acpi_gbl_db_scope_buf[80];
> -ACPI_EXTERN char acpi_gbl_db_debug_filename[80];

If I read the code correctly, these are all inside #ifdefs that are
not defined in kernel mode,
and so the kernel will not be impacted by this buffer growth from 80 to 512,
and this patch is just to keep shared w/ acpiexec the same, yes?

thanks,
Len Brown, Intel Open Source Technology Center

>  ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
>  ACPI_EXTERN char *acpi_gbl_db_buffer;
>  ACPI_EXTERN char *acpi_gbl_db_filename;
> @@ -459,6 +452,16 @@ ACPI_EXTERN u32 acpi_gbl_db_debug_level;
>  ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
>  ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
>
> +ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
> +ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
> +
> +/* These buffers should all be the same size */
> +
> +ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE];
> +ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE];
> +ACPI_EXTERN char acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE];
> +ACPI_EXTERN char acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE];
> +
>  /*
>   * Statistic globals
>   */
> --
> 1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux