[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CVE-2006-0745] X.Org potential privilege elevation and DoS



On Tue, Mar 21, 2006 at 05:28:52PM +0100, Matthias Kilian wrote:
> diff -rNu -x CVS ../lint1/tree.c ./tree.c
> --- ../lint1/tree.c	Tue Mar 21 17:16:56 2006
> +++ ./tree.c	Tue Mar 21 17:14:42 2006
> @@ -3664,6 +3664,12 @@
>  	if (ln->tn_op != CON && rn->tn_op != CON)
>  		return;
>  
> +	if (lt == PTR && isityp(rt) && ln->tn_type->t_subt->t_tspec == FUNC ||
> +	    rt == PTR && isityp(lt) && rn->tn_type->t_subt->t_tspec == FUNC) {
> +		/* comparison of %s with %s, op %s */
> +		warning(162, "function", "number", mp->m_name);
> +	}
> +
>  	if (!isityp(lt) || !isityp(rt))
>  		return;
>  

Sorry, forget that patch; the check is far to loose and will warn
about "normal" function pointers too.

Kili



Visit your host, monkey.org