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:	Mon, 6 Jun 2016 15:33:39 +0300
From:	Daniel Baluta <daniel.baluta@...el.com>
To:	Crestez Dan Leonard <leonard.crestez@...el.com>
Cc:	Jonathan Cameron <jic23@...nel.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald-Stadler <pmeerw@...erw.net>,
	Daniel Baluta <daniel.baluta@...el.com>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: Re: [PATCH] iio: inv_mpu6050: Fix use-after-free in ACPI code

On Fri, Jun 3, 2016 at 9:30 PM, Crestez Dan Leonard
<leonard.crestez@...el.com> wrote:
> In some cases this can result in incorrectly returning a negative value
> from asus_acpi_get_sensor_info and the AK8963 magnetometer failing to
> show up.
>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@...el.com>

Looks good to me. I had to look into the code to see that
cpm is an alias for buffer.pointer, perhaps this should have been
mentioned in the commit message.

Acked-by: Daniel Baluta <daniel.baluta@...el.com>

> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
> index 2771106..f770472 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
> @@ -56,6 +56,7 @@ static int asus_acpi_get_sensor_info(struct acpi_device *adev,
>         int i;
>         acpi_status status;
>         union acpi_object *cpm;
> +       int ret;
>
>         status = acpi_evaluate_object(adev->handle, "CNF0", NULL, &buffer);
>         if (ACPI_FAILURE(status))
> @@ -82,10 +83,10 @@ static int asus_acpi_get_sensor_info(struct acpi_device *adev,
>                         }
>                 }
>         }
> -
> +       ret = cpm->package.count;
>         kfree(buffer.pointer);
>
> -       return cpm->package.count;
> +       return ret;
>  }
>
>  static int acpi_i2c_check_resource(struct acpi_resource *ares, void *data)
> --
> 2.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ