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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Nov 2009 22:04:20 +0800
From:	"Liuweni" <qingshenlwy@...il.com>
To:	"linux-kernel" <linux-kernel@...r.kernel.org>
Cc:	"Ingo Molnar" <mingo@...e.hu>, "xgr178" <xgr178@....com>,
	"strongzgy" <strongzgy@...il.com>,
	"qingshenlwy" <qingshenlwy@....com>,
	"rusty" <rusty@...tcorp.com.au>, "travis" <travis@....com>,
	"adobriyan" <adobriyan@...il.com>, "tglx" <tglx@...utronix.de>
Subject: [PATCH V2]irq/core: Add a length limitation

 ---
In this version, I modify the code by Ingo's suggestion, 
and less code add. 
The code will check the irqaction->name's length 
and avoid Using too long name without any notice.
---
Signed-off-by: Liuwenyi<qingshenlwy@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Mike Travis <travis@....com>
Cc: Alexey Dobriyan <adobriyan@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org

---
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 0832145..b91dcb1 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -196,6 +196,8 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
 	char name [MAX_NAMELEN];
 	struct irq_desc *desc = irq_to_desc(irq);
 
+	WARN_ON(strlen(action->name) < MAX_NAMELEN);
+
 	if (!desc->dir || action->dir || !action->name ||
 					!name_unique(irq, action))
 		return;

 				
--------------
Best Regards,
Liuweni
2009-11-25

--
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