Skip to content

fix(appsec): use length-aware libddwaf bindings to prevent NUL byte truncation#18128

Closed
KowalskiThomas wants to merge 1 commit into
mainfrom
kowalski/fix-appsec-use-length-aware-libddwaf-bindings-to-prevent-nul-byte-truncation
Closed

fix(appsec): use length-aware libddwaf bindings to prevent NUL byte truncation#18128
KowalskiThomas wants to merge 1 commit into
mainfrom
kowalski/fix-appsec-use-length-aware-libddwaf-bindings-to-prevent-nul-byte-truncation

Conversation

@KowalskiThomas
Copy link
Copy Markdown
Contributor

@KowalskiThomas KowalskiThomas commented May 18, 2026

Description

This updates ddwaf_object_map_addl to take a new string length parameter. Previously, due to using raw strlen to detect the string length, it would stop at the first null byte in the input, even if the string was actually longer.

Depends on: DataDog/libddwaf#493

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Codeowners resolved as

ddtrace/appsec/_ddwaf/ddwaf_types.py                                    @DataDog/asm-python

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 18, 2026

Benchmarks

Benchmark execution time: 2026-05-18 08:54:31

Comparing candidate commit 564f5de in PR branch kowalski/fix-appsec-use-length-aware-libddwaf-bindings-to-prevent-nul-byte-truncation with baseline commit fe1f0ac in branch main.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 78 metrics, 0 unstable metrics.

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+79.333µs; +88.810µs] or [+18.460%; +20.666%]

@christophe-papazian
Copy link
Copy Markdown
Contributor

This is currently not an issue for our product, this PR should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASM Application Security Monitoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants