Skip to content

host: limit CPU ID slice to buffer size - #416

Draft
brongan wants to merge 1 commit into
virtee:mainfrom
brongan:fix-getid-slice-len
Draft

brongan wants to merge 1 commit into
virtee:mainfrom
brongan:fix-getid-slice-len

Conversation

@brongan

@brongan brongan commented Nov 11, 2026 •

Copy link
Copy Markdown

Clamp the CPU ID slice length to the buffer capacity.

The kernel sets the CPU ID length. When this length exceeded the buffer capacity, the code created a slice past the end of the buffer.

@brongan
brongan force-pushed the fix-getid-slice-len branch 3 times, most recently from 12a4ed0 to 09eec5e Compare November 12, 2026 19:30
@brongan brongan changed the title host: limit GetId::as_slice to the ID buffer host: limit CPU ID slice to buffer size Nov 12, 2026
@brongan
brongan force-pushed the fix-getid-slice-len branch from 09eec5e to bdea01f Compare November 12, 2026 19:37
Clamp the CPU ID slice length to the buffer capacity.

The kernel sets the CPU ID length. When this length exceeded the buffer
capacity, the code created a slice past the end of the buffer.

Signed-off-by: Brennan Tracy <[email protected]>
@brongan
brongan force-pushed the fix-getid-slice-len branch from bdea01f to 74e8147 Compare November 13, 2026 19:13
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