Skip to content

NDIS: Harden QoS bytes calculation in netvmini control path#1386

Open
andremueiot wants to merge 1 commit into
microsoft:mainfrom
andremueiot:user/andremueiot/multiplication_converted_to_larger_type
Open

NDIS: Harden QoS bytes calculation in netvmini control path#1386
andremueiot wants to merge 1 commit into
microsoft:mainfrom
andremueiot:user/andremueiot/multiplication_converted_to_larger_type

Conversation

@andremueiot
Copy link
Copy Markdown

This fixes:
CodeQL Scanning Alert in network/ndis/netvmini/6x/ctrlpath.c - Multiplication result converted to larger type

Summary:

  • Replaced direct size arithmetic in NICSetQOSParameters with checked integer-safe operations.
  • Added overflow handling for classification table size computation:
  • Multiply NumClassificationElements × ClassificationElementSize via RtlULongMult.
  • Add the revision header size via RtlULongAdd.
  • Return NDIS_STATUS_INVALID_LENGTH when either checked operation fails, instead of relying on unchecked arithmetic.

- Replaced direct size arithmetic in NICSetQOSParameters with checked integer-safe operations.
- Added overflow handling for classification table size computation:
- Multiply NumClassificationElements × ClassificationElementSize via RtlULongMult.
- Add the revision header size via RtlULongAdd.
- Return NDIS_STATUS_INVALID_LENGTH when either checked operation fails, instead of relying on unchecked arithmetic.
@andremueiot andremueiot requested a review from a team as a code owner May 20, 2026 17:57
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