Skip to content

Update Falco with event parsing fix - #3681

Open
Stringy wants to merge 4 commits into
masterfrom
giles/fix-sinsp-event-parse-crash
Open

Update Falco with event parsing fix#3681
Stringy wants to merge 4 commits into
masterfrom
giles/fix-sinsp-event-parse-crash

Conversation

@Stringy

@Stringy Stringy commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates the falcosecurity-libs submodule to include the lenient filename parameter extraction fix.

stackrox/falcosecurity-libs#98

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

CI shuold be enough. Fedora CoreOS x86 was crashing, so this is the priority.

@Stringy
Stringy requested a review from a team as a code owner July 31, 2026 09:44
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d2c92cf9-1080-4dd1-b6a6-f9bd052ed0c7

📥 Commits

Reviewing files that changed from the base of the PR and between 95dfff9 and 3634413.

📒 Files selected for processing (1)
  • falcosecurity-libs
🚧 Files skipped from review as they are similar to previous changes (1)
  • falcosecurity-libs

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated the bundled Falco security libraries to a newer revision.
    • No user-facing functionality or public interfaces changed.

Walkthrough

The falcosecurity-libs submodule reference changes from commit fdb27236a5b589fb2f658cb3453b6e52388eb22c to commit ec3747cd426d8f477e3ef538e0b3cbafc41f2fb9.

Changes

Falco libraries update

Layer / File(s) Summary
Update submodule reference
falcosecurity-libs
The submodule reference changes to commit ec3747cd426d8f477e3ef538e0b3cbafc41f2fb9.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Falco event parsing fix, which matches the submodule update and its primary purpose.
Description check ✅ Passed The description explains the submodule update, linked fix, observed crash, checklist, and testing performed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch giles/fix-sinsp-event-parse-crash

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@collector/lib/system-inspector/Service.cpp`:
- Around line 130-136: Update the sinsp_exception handling in GetNext() so only
genuinely recoverable parse failures return nullptr for Run() to retry;
propagate fatal or invalid-state exceptions or reinitialize the capture instead.
Replace the unthrottled CLOG warning with CLOG_THROTTLED for repeated failures,
preserving the existing successful-event path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 50f110a2-060a-44bb-857d-5889c44504de

📥 Commits

Reviewing files that changed from the base of the PR and between 2b7522e and 7219d7e.

📒 Files selected for processing (2)
  • collector/lib/system-inspector/Service.cpp
  • falcosecurity-libs

Comment thread collector/lib/system-inspector/Service.cpp Outdated
@codecov-commenter

codecov-commenter commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.43%. Comparing base (2b7522e) to head (a28cdc0).
⚠️ Report is 24 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3681   +/-   ##
=======================================
  Coverage   27.43%   27.43%           
=======================================
  Files          94       94           
  Lines        5406     5406           
  Branches     2535     2535           
=======================================
  Hits         1483     1483           
  Misses       3198     3198           
  Partials      725      725           
Flag Coverage Δ
collector-unit-tests 27.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Stringy
Stringy force-pushed the giles/fix-sinsp-event-parse-crash branch from 7219d7e to 701263d Compare July 31, 2026 10:30
@Stringy Stringy changed the title Catch sinsp_exception in Service::GetNext() Update Falco with event parsing fix Jul 31, 2026
Updates the falcosecurity-libs submodule to include a fix for
mismatched event parameter lengths that caused collector to crash
via sinsp_exception -> std::unexpected() -> abort().

The string extraction templates now tolerate parameter lengths that
don't match the null-terminated string length, which has been
observed on some kernels for both string and integer parameters.
@Stringy
Stringy force-pushed the giles/fix-sinsp-event-parse-crash branch from 701263d to 24427d1 Compare August 5, 2026 12:13
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Update submodule to include enhanced diagnostic logging in
throw_invalid_len_error(). This reverts the param_len-1 workaround
so the crash still occurs on Fedora CoreOS CI, but now with full
raw event dumps (header fields, length array, data region) to
identify the root cause of the parameter corruption.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@falcosecurity-libs`:
- Line 1: Use a revision that includes the lenient filename extraction fix and
passes the Fedora CoreOS x86 reproducer; do not use revision
713d313c67b9ce66690f39e31b9ec2e936eb0ccd, which only restores throwing behavior
and diagnostics. Ensure diagnostic handling bounds all raw event access by
raw->len, even when raw->nparams is corrupted.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0c5f8578-f7ec-4852-964f-3c00ae7adde8

📥 Commits

Reviewing files that changed from the base of the PR and between 24427d1 and 95dfff9.

📒 Files selected for processing (1)
  • falcosecurity-libs

Comment thread falcosecurity-libs Outdated
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