← Back to Pull requests

F1AP lib: don't crash on malformed list items and extensions #753

Open
unknown opened this pull request with 189 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 19, 2026 05:11 UTC
Author

Partially addresses #472, #117, and #120.

Fixes crashes reported in the #472 reproducer suite within the F1AP codec library (openair2/F1AP/lib):

  • Missing IE ID/Type check in list items: Items in Served Cells To Add/Modify/Delete, gNB-DU Served Cells, Cells Failed to be Activated, and Paging Cell lists are single-IE containers where asn1c sets value.present = NOTHING on unexpected IDs. The decoders were reading these unverified structures directly (e.g. reading PLMN IDs through NULL pointers). We now validate the IE ID and type before decoding, matching the pattern already used in the UE context lists (#472 M01, M02, M03).
  • Extension list handling: read_slice_info() and RRC Version decoding assumed the first extension in list.array[0] was the expected IE. Other legal extensions (or unknown ones) caused a DevAssert or NULL dereference. We now scan the extension list for the matching ID and ignore unrelated extensions (#472 A29, A31, M04).
  • Non-IPv4 TNL addresses: decode_up_tnl() asserted 32-bit addresses for transport layer addresses (BIT STRING (SIZE(1..160))), aborting when receiving legal IPv6 addresses. We now return an error so the caller can cleanly reject the message (#120, #472 A30).
  • Testing:
    Extended f1ap_lib_test with regression test cases covering the 7 crash PDUs from #472 plus 2 synthetic malformed list PDUs. On develop the test immediately segfaults (exit code 139); with this branch all tests pass cleanly under both default and ASan builds.

    Diff: 189 lines (+141 / -48) across 2 files Reviewer: antcybersec Review duration: 17952m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.41) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.41 · 189 lines diff across 2 files
    0.41
    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%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.314
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #753"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 40.8% (MEDIUM) · Higher = larger blast radius
    40.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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 23.3% · Safe to merge
    23.3%