← Back to Pull requests

[25626] Add test for nesting depth limit in type deserialization #6643

Open
unknown opened this pull request with 575 lines diff across 7 files
View on GitHub
unknown unknown commented on Nov 19, 2026 06:46 UTC
Author

<!-- Provide a general summary of your changes in the Title above -->
<!-- It must be meaningful and coherent with the changes -->

<!--
If this PR is still a Work in Progress [WIP], please open it as DRAFT.
Please consider if any label should be added to this PR.
If no code has been changed, please add skip-ci label.
If opening the PR as Draft, please consider adding no-test label to only build the code but not run CI.
If documentation PR is still pending, please add doc-pending label.
-->

Description

<!--
Describe changes in detail.
This includes depicting the context, use case or current behavior and describe the proposed changes.
If several features/bug fixes are included with these changes, please consider opening separated pull requests.
-->
Adds a regression test for a stack overflow found by OSS-Fuzz.

The fix is in Fast CDR (eProsima/Fast-CDR#356). No Fast DDS source changes are needed: the existing catch in QosPoliciesSerializer already rejects the parameter once Fast CDR throws.

Changes from this PR:

  • Adds the ClusterFuzz testcase as regressions/25626.bin.

  • Runs the regressions inputs on a thread with a 1 MiB stack (the Windows default), so the overflow reproduces on Release builds and not only under ASAN.

  • <!--
    In case of bug fixes, please provide the list of supported branches where this fix should be also merged.
    Please uncomment following line, adjusting the corresponding target branches for the backport.
    -->
    @Mergifyio backport 2.14.x

    <!--
    In case of critical bug fix, please uncomment following line, adjusting the corresponding LTS target branches for the backport.
    -->
    <!-- @Mergifyio backport 2.6.x 2.14.x -->

    <!-- If an issue is already opened, please uncomment next line with the corresponding issue number. -->
    <!-- Fixes #(issue) -->

    <!-- In case the changes are built over a previous pull request, please uncomment next line. -->
    <!-- This PR depends on #(PR) and must be merged after that one. -->

    Contributor Checklist

    <!--
    - If any of the elements of the following checklist is not applicable, substitute the checkbox [ ] by _N/A_:
    - If any of the elements of the following checklist is not fulfilled on purpose, please provide a reason and substitute the checkbox [ ] with ❌: or __NO__:.
    -->

  • Commit messages follow the project guidelines. <!-- External contributors should sign the DCO. Fast DDS developers must also refer to the internal Redmine task. -->

  • The code follows the style guidelines of this project. <!-- Please refer to the Quality Declaration for more information. -->

  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally <!-- Blackbox tests checking the new functionality are required. Changes that add/modify public API must include unit tests covering all possible cases. In case that no tests are provided, please justify why. -->

  • _N/A_ Any new/modified methods have been properly documented using Doxygen. <!-- Even internal classes, and private methods and members should be documented, not only the public API. -->

  • _N/A_ Any new configuration API has an equivalent XML API (with the corresponding XSD extension) <!-- C++ configurable parameters should also be configurable using XML files. -->

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior. <!-- Bug fixes should be ABI compatible if possible so a backport to previous affected releases can be made. -->

  • Changes are API compatible. <!-- Public API must not be broken within the same major release. -->

  • _N/A_ New feature has been added to the versions.md file (if applicable).

  • _N/A_ New feature has been documented/Current behavior is correctly described in the documentation. <!-- Please uncomment following line with the corresponding PR to the documentation project: -->

  • <!-- - Related documentation PR: eProsima/Fast-DDS-docs#(PR) -->
  • Applicable backports have been included in the description.
  • Reviewer Checklist

  • The PR has a milestone assigned.

  • The title and description correctly express the PR's purpose.

  • Check contributor checklist is correct.

  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.

  • Check CI results: changes do not issue any warning.

  • Check CI results: failing tests are unrelated with the changes.
  • Diff: 575 lines (+431 / -144) across 7 files Reviewer: MiguelCompany Review duration: 14301m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 575 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.380
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #6643"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.8% (MEDIUM) · Higher = larger blast radius
    49.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.6% · Safe to merge
    26.6%