krb5-libs/1132: Aname_to_lname RULEs parsing bugs

Nicolas.Williams@ubsw.com Nicolas.Williams at ubsw.com
Wed Jul 3 17:26:47 EDT 2002


>Number:         1132
>Category:       krb5-libs
>Synopsis:       Aname_to_lname RULEs parsing bugs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Wed Jul  3 17:28:01 EDT 2002
>Last-Modified:
>Originator:     Nicolas Williams
>Organization:
-- 
>Release:        krb5-1.2.2
>Environment:
>Description:
	The code that parse aname_to_lname rules naively uses strchr()
	to find matching end-of-regexp characters, thereby making it
	impossible to use those characters in aname2lname rules.

	Specifically, one cannot use sub-expressions in the first regexp
	of an aname2lname rule, though regcomp() is called with the
	REG_EXTENDED flag, indicating the desire to support
	sub-expressions and other regexp extensions. Less importantly,
	rules cannot match ')' for the same reason.

	Also, one cannot match '/' in the regexp portion of the
	transformation part of the rule.

	Register substitutions in the replacement portion of the
	tranformation portion of the rule would be nice
	(e.g., "s/^\(.*\);.*$/\1/").
>How-To-Repeat:
	Sample rules that fail:

	 - RULE:[2:$1;$2](^.*;(admin|root)$)s/;.*$//
	   (fails due to the ')' in the first regexp)

	 - RULE:[2:$1/$2](^.*/admin$)s/\/.*$//
	   (fails due to the '/' in the second regexp)
>Fix:
	The use of strchr() in these expressions, "strchr(startp, ')')"
	and "strchr(&cp[2], '/')", in lib/krb5/os/an_to_ln.c should be
	replaced with a function or expression which allows the first
	regexp to contain balanced parenthesis and which ignores
	backslash-escaped '/' in the second regexp.

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

>Audit-Trail:
>Unformatted:



More information about the krb5-bugs mailing list