Uh oh!
There was an error while loading. Please reload this page.
fix(virtio): route invalid queue_sel in queue_notify_off to a reserved slot - #483
Merged
Merged
Conversation
…d slot When a driver selects an out-of-bounds queue index (queue_sel >= num_queues) and reads LAYOUT_QUEUE_NOTIFY_OFF, returning queue_sel as-is causes the driver to calculate a notify address past the mapped BAR memory, resulting in an undefined behavior. Allocate an additional 4-byte slot at the end of the notify capability and MMIO region, and return min(queue_sel, num_queues) for LAYOUT_QUEUE_NOTIFY_OFF. This routes invalid queue notifications to the reserved slot, which is safely ignored by the MMIO handler without accessing unmapped memory or falsely triggering valid queues. Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Lencerfforce-pushed
the
fix/virtio/oob-notify
branch
from
August 26, 2026 08:25
d5fb74f to
da8a354Comparecoveralls
commented
Aug 26, 2026
Coverage Report for CI Build 32947717444Coverage increased (+0.2%) to 28.142%Details
Uncovered Changes
Coverage Regressions4 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a driver selects an out-of-bounds queue index (queue_sel >= num_queues) and reads LAYOUT_QUEUE_NOTIFY_OFF, returning queue_sel as-is causes the driver to calculate a notify address past the mapped BAR memory, resulting in an undefined behavior.
Allocate an additional 4-byte slot at the end of the notify capability and MMIO region, and return min(queue_sel, num_queues) for LAYOUT_QUEUE_NOTIFY_OFF. This routes invalid queue notifications to the reserved slot, which is safely ignored by the MMIO handler without accessing unmapped memory or falsely triggering valid queues.