mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-10-23 08:07:34 -06:00
[PR #232] [MERGED] fix(nvml): guard field queries against buffer overruns #230
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/nvitop#230
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/XuehaiPan/nvitop/pull/232
Author: @XuehaiPan
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @XuehaiPan
Base:
main← Head:fix/nvml-field-values-overrun📝 Commits (1)
e379608fix(nvml): guard field queries against buffer overruns📊 Changes
2 files changed (+48 additions, -1 deletions)
View changed files
📝
CHANGELOG.md(+1 -1)📝
nvitop/api/libnvml.py(+47 -0)📄 Description
Summary
Fix
nvitop-exporterheap corruption during NVLink throughput collection. On driver 595.91.07,nvmlDeviceGetFieldValues()can access an entry beyond the supplied count; a standalone C reproducer confirms the issue independently of the Python bindings.Mark the extra guard as unsuccessful so the driver skips it. Initialize all entries defensively, return an empty array without calling NVML for empty input, and warn when the compatibility patch cannot be applied. Update the changelog.
Runtime environment: Ubuntu 22.04.5 LTS, Python 3.10.12, eight NVIDIA H200 GPUs, NVML 13.595.91.07, and
nvidia-ml-py13.610.43.Evidence
free(): invalid next size (normal)abort; Valgrind reports out-of-bounds accesses insidenvmlDeviceGetFieldValues().Merge Danger
Door: Two-way; the compatibility wrapper can be reverted without a migration.
Blast Radius: NVML. Applies to field queries through nvitop; requested counts, result lengths, and native errors are preserved for nonempty requests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.