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: <AM6PR10MB2807B94531075D81CF3D1694ECCD0@AM6PR10MB2807.EURPRD10.PROD.OUTLOOK.COM>
Date:   Tue, 8 Dec 2020 09:53:32 +0000
From:   Adam Ward <Adam.Ward.opensource@...semi.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Support Opensource <Support.Opensource@...semi.com>,
        Adam Ward <Adam.Ward.opensource@...semi.com>
CC:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH] regulator: da9121: Potential Oops in
 da9121_assign_chip_model()

Acked-by: Adam Ward <Adam.Ward.opensource@...semi.com>

> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@...cle.com>
> Sent: 07 December 2020 17:56
> To: Support Opensource <Support.Opensource@...semi.com>; Adam Ward
> <Adam.Ward.opensource@...semi.com>
> Cc: Liam Girdwood <lgirdwood@...il.com>; Mark Brown
> <broonie@...nel.org>; linux-kernel@...r.kernel.org; kernel-
> janitors@...r.kernel.org
> Subject: [PATCH] regulator: da9121: Potential Oops in
> da9121_assign_chip_model()
> 
> There is a missing "return ret;" on this error path so we call
> "da9121_check_device_type(i2c, chip);" which will end up dereferencing
> "chip->regmap" and lead to an Oops.
> 
> Fixes: c860476b9e3a ("regulator: da9121: Add device variant regmaps")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/regulator/da9121-regulator.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-
> regulator.c
> index db1c2cc838bc..e4fc3a7cd5d8 100644
> --- a/drivers/regulator/da9121-regulator.c
> +++ b/drivers/regulator/da9121-regulator.c
> @@ -915,6 +915,7 @@ static int da9121_assign_chip_model(struct i2c_client
> *i2c,
>  		ret = PTR_ERR(chip->regmap);
>  		dev_err(chip->dev, "Failed to configure a register map: %d\n",
>  			ret);
> +		return ret;
>  	}
> 
>  	ret = da9121_check_device_type(i2c, chip);
> --
> 2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ