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>] [day] [month] [year] [list]
Message-Id: <20240923222034.9833-1-a.burakov@rosalinux.ru>
Date: Tue, 24 Sep 2024 01:20:34 +0300
From: Aleksandr Burakov <a.burakov@...alinux.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Hans de Goede <hdegoede@...hat.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Aleksandr Burakov <a.burakov@...alinux.ru>,
	linux-kernel@...r.kernel.org,
	lvc-project@...uxtesting.org,
	platform-driver-x86@...r.kernel.org
Subject: [PATCH] platform/x86: android-platform: deref after free in x86_android_tablet_probe() fix

Pointer '&pdevs[i]' is dereferenced in x86_android_tablet_probe()
after the referenced memory was deallocated by calling function
x86_android_tablet_remove().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 62a5f689a068 ("platform/x86: x86-android-tablets: Move core code into new core.c file")
Signed-off-by: Aleksandr Burakov <a.burakov@...alinux.ru>
---
 drivers/platform/x86/x86-android-tablets/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 919ef4471229..dea6ba1fd839 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -390,8 +390,10 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
 	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]);
+
 			x86_android_tablet_remove(pdev);
-			return PTR_ERR(pdevs[i]);
+			return ret;
 		}
 	}
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ