Fedora Account System
Red Hat Associate
Red Hat Customer
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process. Reported via the Product Security support portal by an external researcher (report date 2026-11-12; reporter asked for confidential handling at report time). virglrenderer's vrend GL backend translates guest-supplied TGSI shaders to host GLSL. add_missing_semantic_inputs() (src/vrend/vrend_shader.c:5487-5524 @ upstream 01637fc; byte-identical in 1.3.0) appends "missing" varying inputs at inputs[*num_inputs] with no capacity check, while all declaration paths bound num_inputs at ARRAY_SIZE(inputs) == 64. The shader key's expected masks are copied verbatim from the linked previous stage's emitted-output masks (vrend_renderer.c:4027-4033), so declared + missing inputs can exceed 64, and the first append past inputs[64] writes out of bounds into the following dump_ctx members (dump_ctx is stack-allocated in vrend_convert_shader). Introduced by upstream commit 1a106aed (2022-07-07), first released in virglrenderer 0.10.0; present through current main (01637fc) and 1.3.0. Trigger (reproduced end-to-end): VS with exactly 64 output declarations (POSITION + GENERIC[0..61] + TEXCOORD[0]); FS with exactly 64 input declarations (GENERIC[0..63], no texcoord). On draw, the FS translation appends the missing TEXCOORD at inputs[64]. Reproduction: ASan build of the Fedora 44 srpm (1.3.0) with a behavior-neutral test-only canary after inputs[]; driven via vtest, which uses the same virgl_renderer_submit_cmd entry point as virtio-gpu. Trigger run: ASan abort (use-after-poison) in add_missing_semantic_inputs with the full guest-reachable stack (vrend_draw_vbo -> vrend_select_program -> vrend_shader_select -> vrend_convert_shader -> iter_instruction -> add_missing_inputs). Negative control (identical pair minus the single VS TEXCOORD declaration): clean, server survives. Impact: deterministic guest-triggered 152-byte stack write one element past inputs[64], intra-dump_ctx, semi-controlled content. In the uninstrumented build the write corrupts num_outputs/outputs[] (num_outputs receives 0x5F6F7376 from the appended entry's name), leading to far out-of-bounds reads in subsequent loops and a crash of the host renderer process (in-process and unsandboxed under QEMU). Code execution not demonstrated. Worst-case extent (static estimate): up to ~200 appended entries (~20.7 KB) reaching temp_ranges and later pointer members. CVSS 3.1 (computed with the cvss package): AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H = 8.8 High (crash-only floor: C:N/I:N/A:H = 6.5 Medium). Red Hat exposure: no supported RHEL release ships an affected version (RHEL 8 ships 0.8.2, which predates the vulnerable function; RHEL 9 does not ship virglrenderer; the package is retired in RHEL 10). Suggested fix (validated by our analysis): capacity check in add_missing_semantic_inputs (return a translation error when *num_inputs >= ARRAY_SIZE(inputs)), and/or cap declared + missing against the inputs capacity in add_missing_inputs. Internal artifacts: PSIRTSUPT-30495 ticket directory (analysis.md, static/dynamic/adversarial analysis, evidence/asan-trigger.log, poc/vtest_trigger.c).