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-next>] [day] [month] [year] [list]
Message-Id: <20250206134706.60200-1-dheeraj.linuxdev@gmail.com>
Date: Thu,  6 Feb 2025 19:17:06 +0530
From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
To: lucas.demarchi@...el.com,
	thomas.hellstrom@...ux.intel.com,
	rodrigo.vivi@...el.com
Cc: airlied@...il.com,
	simona@...ll.ch,
	intel-xe@...ts.freedesktop.org,
	dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org,
	Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
Subject: [PATCH] drm/xe: Fix uninitialized pointer read in xe_vm_bind_kernel_bo

xe_vm_bind_kernel_bo() declares the variable fence without initializing
it. If an error occurs before fence is assigned a valid value, the
function may return an uninitialized pointer.

Specifically, this can happen if:

- vm_bind_ioctl_ops_create() fails, leading to release_vm_lock error
  path

Initialize fence to NULL at declaration.

Fixes: dcdd6b84d9ac ("drm/xe/pxp: Allocate PXP execution resources")
Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index d664f2e418b2..b6ca53ede904 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3184,7 +3184,7 @@ struct dma_fence *xe_vm_bind_kernel_bo(struct xe_vm *vm, struct xe_bo *bo,
 {
 	struct xe_vma_ops vops;
 	struct drm_gpuva_ops *ops = NULL;
-	struct dma_fence *fence;
+	struct dma_fence *fence = NULL;
 	int err;
 
 	xe_bo_get(bo);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ