Skip to content

core: enforce bounds checks on input-derived lengths#3888

Open
TristanInSec wants to merge 1 commit intoOpenSIPS:masterfrom
TristanInSec:fix/input-validation-bounds-checks
Open

core: enforce bounds checks on input-derived lengths#3888
TristanInSec wants to merge 1 commit intoOpenSIPS:masterfrom
TristanInSec:fix/input-validation-bounds-checks

Conversation

@TristanInSec
Copy link
Copy Markdown

Add input length validation in several code paths:

  • transformations: account for base64 4/3 expansion in b64encode output length check
  • parser/parse_body: validate remaining buffer length before delimiter comparison in multipart boundary search
  • net/proto_tcp: validate Content-Length value before multiplication to prevent integer wraparound
  • sipmsgops: enforce header name length limit in sip_to_json conversion
  • msg_translator: validate total URI length in construct_uri before writing components

- transformations: account for base64 4/3 expansion in b64encode
  output length check
- parser/parse_body: validate remaining buffer length before delimiter
  comparison in multipart boundary search
- net/proto_tcp: validate Content-Length value before multiplication
  to prevent integer wraparound
- sipmsgops: enforce header name length limit in sip_to_json
  conversion
- msg_translator: validate total URI length in construct_uri before
  writing components
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