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: <20240806092249.2407555-1-make24@iscas.ac.cn>
Date: Tue,  6 Aug 2024 17:22:49 +0800
From: Ma Ke <make24@...as.ac.cn>
To: jani.nikula@...ux.intel.com,
	rodrigo.vivi@...el.com,
	joonas.lahtinen@...ux.intel.com,
	tursulin@...ulin.net,
	airlied@...il.com,
	daniel@...ll.ch,
	ville.syrjala@...ux.intel.com,
	stanislav.lisovskiy@...el.com
Cc: intel-gfx@...ts.freedesktop.org,
	intel-xe@...ts.freedesktop.org,
	dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org,
	Ma Ke <make24@...as.ac.cn>,
	stable@...r.kernel.org
Subject: [PATCH] drm/i915: Fix NULL ptr deref in intel_async_flip_check_uapi()

intel_atomic_get_new_crtc_state can return NULL, unless crtc state wasn't
obtained previously with intel_atomic_get_crtc_state. We should check it
for NULLness here, just as in many other places, where we can't guarantee
that intel_atomic_get_crtc_state was called.

Cc: stable@...r.kernel.org
Fixes: b0b2bed2a130 ("drm/i915: Check async flip capability early on")
Signed-off-by: Ma Ke <make24@...as.ac.cn>
---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index c2c388212e2e..9dd7b5985d57 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6115,7 +6115,7 @@ static int intel_async_flip_check_uapi(struct intel_atomic_state *state,
 		return -EINVAL;
 	}
 
-	if (intel_crtc_needs_modeset(new_crtc_state)) {
+	if (new_crtc_state && intel_crtc_needs_modeset(new_crtc_state)) {
 		drm_dbg_kms(&i915->drm,
 			    "[CRTC:%d:%s] modeset required\n",
 			    crtc->base.base.id, crtc->base.name);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ