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]
Message-ID: <1521811393.27781.2.camel@tzanussi-mobl.amr.corp.intel.com>
Date:   Fri, 23 Mar 2018 08:23:13 -0500
From:   Tom Zanussi <tom.zanussi@...ux.intel.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] tracing: Fix a potential NULL dereference

Hi Dan,

On Fri, 2018-03-23 at 14:37 +0300, Dan Carpenter wrote:
> We forgot to set the error code on this path so we return ERR_PTR(0)
> which is NULL.  It results in a NULL dereference in the caller.
> 
> Fixes: 100719dcef44 ("tracing: Add simple expression support to hist triggers")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 4f027642ceef..a02bc09d765a 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -2776,6 +2776,7 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
>  		expr->fn = hist_field_plus;
>  		break;
>  	default:
> +		ret = -EINVAL;
>  		goto free;
>  	}
>  

Acked-by: Tom Zanussi <tom.zanussi@...ux.intel.com>

Thanks for catching this!

Tom

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ