Skip to content

Validate offload block request lengths - #6166

Open
WalidNejmi wants to merge 1 commit into
bloomberg:mainfrom
WalidNejmi:validate-offload-block-request-lengths
Open

Validate offload block request lengths#6166
WalidNejmi wants to merge 1 commit into
bloomberg:mainfrom
WalidNejmi:validate-offload-block-request-lengths

Conversation

@WalidNejmi

Copy link
Copy Markdown

Check the received and declared payload sizes before processing block requests and add defensive bounds checks to block request handling.

The payload offset is derived with offsetof() rather than sizeof(), since the message struct ends in a flexible-style array and sizeof() may include trailing padding.

To help us review your pull request, please consider providing an overview of the following:

  • What is the type of the change (bug fix, feature, documentation and etc.) ?
  • What are the current behavior and expected behavior, if this is a bugfix ?
  • What are the steps required to reproduce the bug, if this is a bugfix ?
  • What is the current behavior and new behavior, if this is a feature change or enhancement ?
  • [Optional] Why is the new behavior better than the current behavior, if this is a feature change ?

Check the received and declared payload sizes before processing block
requests and add defensive bounds checks to block request handling.

The payload offset is derived with offsetof() rather than sizeof(), since
the message struct ends in a flexible-style array and sizeof() may include
trailing padding.

Signed-off-by: Walid Nejmi <wnejmi@bloomberg.net>

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
triggersc_latency
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**

@WalidNejmi

Copy link
Copy Markdown
Author

/adhoc-test triggersc_latency cdb2jdbc

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.

2 participants