lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091124144530.GB17934@elte.hu>
Date:	Tue, 24 Nov 2009 15:45:30 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Liuweni <qingshenlwy@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	xgr178 <xgr178@....com>, Jiri Kosina <jkosina@...e.cz>,
	qingshenlwy <qingshenlwy@....com>
Subject: Re: [PATCH]irq/core:Add a length limitation


* Liuweni <qingshenlwy@...il.com> wrote:

> In the register_handler_proc(), the max length of irqaction->name is 
> MAX_NAMELEN. And this function will call name_unique() to compare name 
> with other irqs'.
>
> There is no any code for limitation the length. I add a warning in the 
> function to notice that the irqaction->name is too long.
> 
> Signed-off-by: Liuwenyi <qingshenlwy@...il.com>
> ---
> diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
> index 0832145..9ab6e04 100644
> --- a/kernel/irq/proc.c
> +++ b/kernel/irq/proc.c
> @@ -196,6 +196,9 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
>  	char name [MAX_NAMELEN];
>  	struct irq_desc *desc = irq_to_desc(irq);
>  
> +	if(strlen(action->name) >= MAX_NAMELEN)
> +		WARN_ON(1);
> +

Has this situation happened in the past that requires this check to be 
added? The current limit of 128 chars is quite generous. Also, the check 
is buggy, it's off by 1.

( Also, please use scripts/checkpatch.pl on patches and please use 
  'scripts/get_maintainer.pl -f kernel/irq/proc.c' when constructing Cc: 
  lines. )

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ