Skip to content

guest: handle small certificate buffers - #414

Draft
brongan wants to merge 1 commit into
virtee:mainfrom
brongan:fix-ext-report-sentinel
Draft

brongan wants to merge 1 commit into
virtee:mainfrom
brongan:fix-ext-report-sentinel

Conversation

@brongan

@brongan brongan commented Nov 11, 2026 •

Copy link
Copy Markdown

Check the firmware error status after each report request. Allocate a larger buffer and retry when the firmware needs more space. Confirm that a certificate buffer exists before reading its entries. Parse the certificate table from the allocated buffer.

Some kernels do not fail the ioctl when the certificate buffer is too small. On those kernels, the code read the certificate table from an invalid placeholder address.

@brongan
brongan force-pushed the fix-ext-report-sentinel branch from 054d7d3 to 33280b5 Compare November 11, 2026 19:12
@brongan
brongan force-pushed the fix-ext-report-sentinel branch from 33280b5 to ca9741a Compare November 12, 2026 19:30
@brongan brongan changed the title guest: check fw_err after every extended report ioctl guest: handle small certificate buffers Nov 12, 2026
@brongan
brongan force-pushed the fix-ext-report-sentinel branch from ca9741a to 92ab6c0 Compare November 12, 2026 19:37
Check the firmware error status after each report request. Allocate a
larger buffer and retry when the firmware needs more space. Confirm that
a certificate buffer exists before reading its entries. Parse the
certificate table from the allocated buffer.

Some kernels do not fail the ioctl when the certificate buffer is too
small. On those kernels, the code read the certificate table from an
invalid placeholder address.

Signed-off-by: Brennan Tracy <[email protected]>
@brongan
brongan force-pushed the fix-ext-report-sentinel branch from 92ab6c0 to 1afeb95 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