Skip to content

pmproxy/UBSAN: fix out-of-bounds access - #2749

Open
rmetrich wants to merge 1 commit into
performancecopilot:mainfrom
rmetrich:ubsan__2
Open

rmetrich wants to merge 1 commit into
performancecopilot:mainfrom
rmetrich:ubsan__2

Conversation

@rmetrich

@rmetrich rmetrich commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Pull Request Description

This is seen in pmproxy.log as:

query.c:240:29: runtime error: index 1 out of bounds for type 'seriesGetSID [*]'

Pull Request Description

Related PR

See also ASAN+UBSAN PR

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 100c0b02-b2bd-4c6d-ba78-16a73229e3f2

📥 Commits

Reviewing files that changed from the base of the PR and between 7f218c8 and 5d89a9e.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d6068572-c2ec-471d-9d41-cdcc5736d3aa

📥 Commits

Reviewing files that changed from the base of the PR and between f042c2e and 7f218c8.


📒 Files selected for processing (1)
  • src/libpcp_web/src/query.c

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.



📝 Summary

Summary by CodeRabbit

  • No user-facing changes
    • This update changes internal storage only; no end-user behavior is affected.

Walkthrough

The seriesGetLookup.series member changes from a zero-length array to a flexible array member. Existing allocation and lookup logic still use nseries to size and access the trailing entries.

Changes

Series lookup storage

Layer / File(s) Summary
Flexible array declaration
src/libpcp_web/src/query.c
seriesGetLookup.series is now a flexible array member. Allocation and lookup continue to use nseries.

Suggested reviewers: natoscott


Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7f218

This is a one-line declaration change that silences a sanitizer out-of-bounds report for series lookups. It does not change allocation or lookup behavior, so it adds no new risk and is ready to merge.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the UBSAN out-of-bounds access fix in pmproxy.
Description check ✅ Passed The description reports the UBSAN error that this change addresses and links a related PR.
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.


  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the trailing array,
One more neat entry tucked away.
The count still guides each lookup right,
The series rest in flexible flight.
Then hops off, pleased with the change.

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

This is seen in pmproxy.log as:

query.c:240:29: runtime error: index 1 out of bounds for type 'seriesGetSID [*]'

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
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