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]
Date:	Wed, 17 Dec 2008 14:28:42 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	"George Spelvin" <linux@...izon.com>
Cc:	linux-kernel@...r.kernel.org, tj@...nel.org
Subject: Re: [RFC] globmatch() helper function

"George Spelvin" <linux@...izon.com> writes:

Wow, finally a name.

> 			break;
> 		case '*':
> 			if (pat[1] == '\0')	/* Optimize trailing * case */
> 				return true;
> 			/* Recurse on each possible tail of str */
> 			while (!globmatch(pat+1, str))
> 				if (!*str++)
> 					return false;

I'm uneasy with the unbounded recursion. Sure currently all the users
are controlled in kernel source code and expect to put in sane patterns.
But if someone ever adds a user controlled glob in some way it will be 
trivial to crash/overwrite memory with the limited kernel stack.
And with such a generalized function it's likely to be used more
in the future.

-Andi


-- 
ak@...ux.intel.com
--
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