Skip to content

vgpu: skip malformed vendor capability records instead of panicking#1912

Open
AruneshDwivedi wants to merge 1 commit into
NVIDIA:mainfrom
AruneshDwivedi:fix/vendor-capability-bounds-check
Open

vgpu: skip malformed vendor capability records instead of panicking#1912
AruneshDwivedi wants to merge 1 commit into
NVIDIA:mainfrom
AruneshDwivedi:fix/vendor-capability-bounds-check

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

GetVendorSpecificCapability sliced the PCI config buffer with a length byte read from config space and no bounds check, so a malformed record panicked gpu-feature-discovery and broke GFD refresh for the whole node. It now skips the bad record so one device can't crash the process.

Used AI to help identify and draft this fix — reviewed and tested before submitting.

GetVendorSpecificCapability sliced the PCI config buffer using a length byte read from config space without checking pos+length against len(d.Config), so a malformed record panicked gpu-feature-discovery and crashed the node's GFD refresh loop. Guard the slice and skip the record so one bad device can't take down the whole process.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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.

1 participant