From ecfce9f9adb5bc6730bf8ac447f70efdcb822d50 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 9 Sep 2025 18:29:38 +0000 Subject: [PATCH] blorp: Fix potential read of uninitaized elk fields in debug paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The intel_vue_map is only partially initialized before being used. All used fields are initialized, but in debug paths the unitialzed fields will also be read. To fix this initialize the struct to 0. In the brw path this struct is part of the prog_data, and is rzalloc'd. CID: 1665308 Reviewed-by: Iván Briano Part-of: --- src/intel/blorp/blorp_elk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/blorp/blorp_elk.c b/src/intel/blorp/blorp_elk.c index 6fec1d7fdd5..3f36a091af4 100644 --- a/src/intel/blorp/blorp_elk.c +++ b/src/intel/blorp/blorp_elk.c @@ -232,7 +232,8 @@ blorp_ensure_sf_program_elk(struct blorp_batch *batch, const unsigned *program; unsigned program_size; - struct intel_vue_map vue_map; + /* Some fields that are not set can be read in debug paths, so initialization is required */ + struct intel_vue_map vue_map = {0}; elk_compute_vue_map(compiler->devinfo, &vue_map, slots_valid, INTEL_VUE_LAYOUT_FIXED, 1);