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] [day] [month] [year] [list]
Message-ID: <96bcc902-630f-83c2-0e4b-27ed552fbe09@omp.ru>
Date: Tue, 17 Sep 2024 21:55:23 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Aleksandr Burakov <a.burakov@...alinux.ru>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, <stable@...r.kernel.org>, Hans de Goede
	<hdegoede@...hat.com>, Mark Gross <markgross@...nel.org>
CC: <lvc-project@...uxtesting.org>, <lvc-patches@...uxtesting.org>,
	<platform-driver-x86@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [lvc-patches] [PATCH 6.1] platform/x86: android-platform: deref
 after free in x86_android_tablet_init() fix

On 9/17/24 15:04, Aleksandr Burakov wrote:

> No upstream commit exists for this commit.
> 
> Pointer '&pdevs[i]' is dereferenced at x86_android_tablet_init()

   s/at/in.

> after the referenced memory was deallocated by calling function
> 'x86_android_tablet_cleanup()'.

   No quotes around a function name the 1st time, and here they are
the 2nd time. Please be consistent...

> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 5eba0141206e ("platform/x86: x86-android-tablets: Add support for instantiating platform-devs")
> Signed-off-by: Aleksandr Burakov <a.burakov@...alinux.ru>
> ---
>  drivers/platform/x86/x86-android-tablets.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/x86-android-tablets.c b/drivers/platform/x86/x86-android-tablets.c
> index 9178076d9d7d..9838c5332201 100644
> --- a/drivers/platform/x86/x86-android-tablets.c
> +++ b/drivers/platform/x86/x86-android-tablets.c
> @@ -1853,8 +1853,9 @@ static __init int x86_android_tablet_init(void)
>  	for (i = 0; i < pdev_count; i++) {
>  		pdevs[i] = platform_device_register_full(&dev_info->pdev_info[i]);
>  		if (IS_ERR(pdevs[i])) {
> +			int ret = PTR_ERR(pdevs[i]);

   Need an empty line after the declartion, BTW...

>  			x86_android_tablet_cleanup();
> -			return PTR_ERR(pdevs[i]);
> +			return ret;
>  		}
>  	}

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ