Copy nested capabilities_ex structure during interface init #923
+58
−9
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.
Description
Describe the purpose of and changes within this Pull Request.
#845 exposed a latent bug in the interface binding module: each interface copied the caller's capabilities struct into the interface object, but it left dangling pointers within that struct. If an interface was later removed, the new
XdpRxQueueEnableChecksumOffloadroutine could dereference the dangling pointer and AV.The expected lifetime of the caller's structure isn't clearly documented, but it certainly can't persist beyond the interface's final
RemoveInterfaceCompletecallback, which is the state during the CI bugcheck.Also do the same thing for the
Hooksnested pointer.Also validate the size of the capabilities struct is large enough to contain the new/optional
RxChecksumSupportedfield.Resolves #922
Testing
Do any existing tests cover this change? Are new tests needed?
Builds locally, CI.
Documentation
Is there any documentation impact for this change?
N/A.
Installation
Is there any installer impact for this change?
N/A.