Skip to content

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

Merged
sarat-k merged 1 commit into
ROCm:mainfrom
spraveenio:sec-fix-gpuctl-cves
Jul 27, 2026
Merged

sec-fix: remediate gpuctl HIGH/UNKNOWN CVEs via dependency bumps#82
sarat-k merged 1 commit into
ROCm:mainfrom
spraveenio:sec-fix-gpuctl-cves

Conversation

@spraveenio

@spraveenio spraveenio commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Remediates all trivy-flagged HIGH and UNKNOWN CVEs in the gpuctl Go binary by bumping replace pins in sw/nic/gpuagent/go.mod and the mod: target of sw/nic/gpuagent/Makefile, then regenerating go.sum/vendor via make mod:

Package From To 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 up to v0.53.0, which no longer matched the prior x/net@v0.48.0 replace; pins are retargeted to the current base versions. No Go toolchain bump needed (no stdlib HIGH/CRITICAL), so build-container Dockerfiles and the builder image are untouched.

Test plan

  • make mod regenerates go.sum/vendor cleanly with the new pins
  • gpuctl rebuilt; embedded deps confirmed (grpc v1.82.1, x/net v0.56.0, x/text v0.39.0)
  • trivy scan of the rebuilt gpuctl reports zero findings across all severities

🤖 Generated with Claude Code

@spraveenio
spraveenio requested a review from sarat-k July 27, 2026 21:28
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 force-pushed the sec-fix-gpuctl-cves branch from f3c5315 to 686b4e8 Compare July 27, 2026 21:35
@spraveenio spraveenio changed the title sec-fix: bump gRPC to v1.82.1 to fix GHSA-hrxh-6v49-42gf (HIGH) sec-fix: remediate gpuctl HIGH/UNKNOWN CVEs via dependency bumps Jul 27, 2026

@sarat-k sarat-k left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sarat-k
sarat-k merged commit ae77eb3 into ROCm:main Jul 27, 2026
1 check passed
@spraveenio
spraveenio deleted the sec-fix-gpuctl-cves branch July 27, 2026 22:33
sarat-k pushed a commit that referenced this pull request Jul 29, 2026
* gimamdsmi: fix aga_obj_key_t::str() UUID truncation from sizeof(char*) (#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.

* sec-fix: remediate gpuctl HIGH/UNKNOWN CVEs via dependency bumps (#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>

---------

Co-authored-by: Bhanu Kiran Atturu <bhatturu@amd.com>
Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants