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:   Fri, 16 Jun 2023 15:59:06 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Martin Fuzzey <martin.fuzzey@...wbird.group>
Cc:     Support Opensource <support.opensource@...semi.com>,
        Benjamin Bara <benjamin.bara@...data.com>,
        Adam Ward <DLG-Adam.Ward.opensource@...renesas.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: da9063: fix null pointer deref with partial
 DT config

On Fri, Jun 16, 2023 at 04:36:28PM +0200, Martin Fuzzey wrote:

>  	const struct notification_limit *uv_l = &constr->under_voltage_limits;
>  	const struct notification_limit *ov_l = &constr->over_voltage_limits;
>  
> +	if (!config->init_data) /* No config in DT, pointers will be invalid */
> +		return 0;
> +

We already dereferenced above when we were initialising the variables,
the compiler might still generate dereferences before it does the checks
here.

>  	/* make sure that only one severity is used to clarify if unchanged, enabled or disabled */
>  	if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) {
>  		dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n",
> -- 
> 2.25.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ