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  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]
Date:	Sat, 7 Apr 2007 19:47:00 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Larry Finger <Larry.Finger@...inger.net>
Cc:	LKML <linux-kernel@...r.kernel.org>, rusty@...tcorp.com.au
Subject: [PATCH] Re: kernel oops with badly formatted module option

On Sat, 07 Apr 2007 19:21:01 -0500 Larry Finger wrote:

> With the following line in /etc/modprobe.conf.local:
> 
> options bcm43xx fwpostfix = ".fw3" locale=8
> 
> the kernel oops below is generated. I realize that the line should have no whitespace around the 
> "=", but I do not feel that an oops is the best way to report the syntax error. Could there be a more gentle failure?


From: Randy Dunlap <randy.dunlap@...cle.com>

Catch malformed kernel parameter usage of "param = value".
Spaces are not supported, but don't cause a kernel fault on
such usage, just report an error.

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 kernel/params.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.21-rc6.orig/kernel/params.c
+++ linux-2.6.21-rc6/kernel/params.c
@@ -356,6 +356,10 @@ int param_set_copystring(const char *val
 {
 	struct kparam_string *kps = kp->arg;
 
+	if (!val) {
+		printk(KERN_ERR "%s: missing param set value\n", kp->name);
+		return -EINVAL;
+	}
 	if (strlen(val)+1 > kps->maxlen) {
 		printk(KERN_ERR "%s: string doesn't fit in %u chars.\n",
 		       kp->name, kps->maxlen-1);
-
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