Skip to content

release-v1.5.1: cherry-pick #81 and #82 from main - #84

Merged
sarat-k merged 2 commits into
ROCm:release-v1.5.1from
spraveenio:cherry-pick-to-release-v1.5.1
Jul 29, 2026
Merged

release-v1.5.1: cherry-pick #81 and #82 from main#84
sarat-k merged 2 commits into
ROCm:release-v1.5.1from
spraveenio:cherry-pick-to-release-v1.5.1

Conversation

@spraveenio

Copy link
Copy Markdown
Contributor

Cherry-picks from main

Backports two fixes from main to bring release-v1.5.1 in sync.


#81 — gimamdsmi: fix aga_obj_key_t::str() UUID truncation (base.hpp)

str() passed sizeof(buf) as the snprintf bound where buf is a char*, so the bound was 8 (pointer width) instead of the buffer length. For the MAC-tail loop (off >= 24), sizeof(buf) - off underflows to a size_t well above INT_MAX; glibc rejects it, so the final 12-hex UUID group is never written and str() returns a 25-char truncated UUID.

Under AGA_SMI_LAZY_INIT=1, AGA_SMI_SESSION_GUARD re-resolves the GPU handle via amdsmi_get_processor_handle_from_uuid(gpu_key->str()). The GIM amdsmi lib's is_uuid_valid() rejects the truncated string with AMDSMI_STATUS_INVAL; the guard bails before filling the spec or reading the virtualization mode. Net effect on GIM/SR-IOV hosts: deployment_mode reported as baremetal, all GPU metrics dropped.

Fix: replace sizeof(buf) - off with (OBJ_MAX_KEY_STR_LEN + 1) - off.
Validated: leto MI210 GIM host with AGA_SMI_LAZY_INIT=1 — resolve failures 14→0, full 36-char UUID emitted, deployment_mode=hypervisor, full metric set restored.


#82 — sec-fix: remediate gpuctl HIGH/UNKNOWN CVEs via Go dependency bumps

Trivy scan of the gpuctl binary flagged the following. Fixed by updating replace pins in go.mod / Makefile and regenerating go.sum/vendor via make mod:

Dependency Old New CVEs
google.golang.org/grpc v1.79.3 v1.82.1 GHSA-hrxh-6v49-42gf (HIGH)
golang.org/x/net v0.53.0 v0.56.0 CVE-2026-25681, CVE-2026-27136, CVE-2026-39821 (HIGH); CVE-2026-25680, CVE-2026-42502, CVE-2026-42506 (MEDIUM); CVE-2026-46600 (UNKNOWN)
golang.org/x/text v0.38.0 v0.39.0 CVE-2026-56852 (UNKNOWN)

The grpc bump pulled x/net to v0.53.0, invalidating the prior x/net@v0.48.0 pin; replace targets are retargeted accordingly. Post-rebuild trivy reports zero findings. No Go toolchain bump required.

bhatturu and others added 2 commits July 29, 2026 11:34
ROCm#81)

str() used sizeof(buf) as the snprintf bound while buf is a char*, so the
bound was 8 (pointer size), not the buffer length. For the MAC-tail loop
(off>=24) the expression sizeof(buf)-off underflows to a size_t far above
INT_MAX, which glibc snprintf rejects, so the final 12-hex UUID group is
never written. str() returns a truncated 25-char UUID.

This is normally harmless (str() is used for logging) but under
AGA_SMI_LAZY_INIT=1 the per-request AGA_SMI_SESSION_GUARD re-resolves the
GPU handle via amdsmi_get_processor_handle_from_uuid(gpu_key->str()). The
GIM amdsmi lib's is_uuid_valid() rejects the truncated string with
AMDSMI_STATUS_INVAL, so the guard bails before filling any spec and before
the virtualization-mode read. Net effect on a GIM/SR-IOV host:
deployment_mode reported as baremetal and all GPU metrics dropped.

Use OBJ_MAX_KEY_STR_LEN + 1 as the bound. Validated on leto MI210 GIM host
with AGA_SMI_LAZY_INIT=1: resolve failures 14->0, full 36-char UUID emitted,
deployment_mode=hypervisor, full metric set restored.
…m#82)

Scans of the gpuctl Go binary flagged several vulnerabilities. Fixed by
updating the replace pins in go.mod and the Makefile mod: target, then
regenerating go.sum/vendor via `make mod`:

- google.golang.org/grpc  v1.79.3 -> v1.82.1  (GHSA-hrxh-6v49-42gf, HIGH)
- golang.org/x/net        v0.53.0 -> v0.56.0  (CVE-2026-25681, CVE-2026-27136,
  CVE-2026-39821 HIGH; CVE-2026-25680, CVE-2026-42502, CVE-2026-42506 MEDIUM;
  CVE-2026-46600 UNKNOWN)
- golang.org/x/text       v0.38.0 -> v0.39.0  (CVE-2026-56852, UNKNOWN)

The grpc bump pulled x/net up to v0.53.0, which no longer matched the prior
x/net@v0.48.0 replace; the pins are retargeted to the current base versions.
trivy scan of the rebuilt gpuctl binary reports zero findings across all
severities. No Go toolchain bump needed (no stdlib HIGH/CRITICAL).

Co-authored-by: Claude <noreply@anthropic.com>
@spraveenio
spraveenio requested a review from sarat-k July 29, 2026 18:38
@sarat-k
sarat-k merged commit 1f14a3e into ROCm:release-v1.5.1 Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants