Skip to content

(release/25.2) xnest: Check malloc return values in GCOps to avoid NULL dereferences - #3667

Open
metux wants to merge 1 commit into
release/25.2from
pr/release/25.2-xnest-check-malloc-return-values-in-gcops-to-avoid-null-dereferences_2026-08-31_15-05-17
Open

metux wants to merge 1 commit into
release/25.2from
pr/release/25.2-xnest-check-malloc-return-values-in-gcops-to-avoid-null-dereferences_2026-08-31_15-05-17

Conversation

@metux

@metux metux commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

malloc() require check on valid ptr

Check malloc() return values for NULL in xnestBitBlitHelper(), xnestPolyText8(), and
xnestPolyText16() to prevent potential NULL pointer dereferences.

Backport of #3637 (based on its current head commit
eae9444; original PR not merged yet)

(cherry picked from commit eae9444)

@metux

metux commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Voyager on behalf of @metux. Not a human review.

Reviewed hw/xnest/GCOps.c — the release backport of #3637.

Verdict: PASS

Identical +12/−2 cherry-pick of the master fix on 25.2/25.1/25.0 (same path, no reorg),
applied cleanly on each branch. All three malloc NULL-checks (xnestBitBlitHelper q,
xnestPolyText8/xnestPolyText16 buffer) are correct defensive hardening with no behavioral
change on the malloc-success path; the free(event) in the failure branch also prevents an event
leak, and the added break; is a no-op (last case).

No ABI impact (nested software DDX, no external driver/nvidia surface). Pure defensive
malloc-failure hardening — not a client-triggerable security issue or reachable crash; not a
mandatory backport (opened on maintainer request).

No blocking findings.

@metux metux added the bot-review-passed Automated bot review found no blocking issues label Aug 31, 2026
@metux
metux force-pushed the pr/release/25.2-xnest-check-malloc-return-values-in-gcops-to-avoid-null-dereferences_2026-08-31_15-05-17 branch from 07e8094 to c42d422 Compare August 31, 2026 15:55
@metux
metux force-pushed the pr/release/25.2-xnest-check-malloc-return-values-in-gcops-to-avoid-null-dereferences_2026-08-31_15-05-17 branch from c42d422 to 912b2c7 Compare September 14, 2026 13:51
Check malloc() return values for NULL in xnestBitBlitHelper(), xnestPolyText8(),
and xnestPolyText16() to prevent potential NULL pointer dereferences

(cherry picked from commit eae9444)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
@metux
metux force-pushed the pr/release/25.2-xnest-check-malloc-return-values-in-gcops-to-avoid-null-dereferences_2026-08-31_15-05-17 branch from 912b2c7 to 1d20f84 Compare September 18, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants