Skip to content

fix(unwind): prevent section table size overflow - #2028

Closed
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/fix/libunwind-section-table-overflow
Closed

fix(unwind): prevent section table size overflow#2028
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/fix/libunwind-section-table-overflow

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Calculate malformed ELF section table bounds without overflowing the promoted header fields or their offset sum.

Fixes: https://github.com/getsentry/sentry-native/security/code-scanning/5

Warning

Multiplication result converted to larger type

Multiplication result may overflow 'int' before it is converted to 'unsigned long'.

https://codeql.github.com/codeql-query-help/cpp/cpp-integer-multiplication-cast-to-long/

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.33%. Comparing base (f6e6cd0) to head (b4e7bfd).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2028      +/-   ##
==========================================
+ Coverage   74.30%   74.33%   +0.03%     
==========================================
  Files         104      104              
  Lines       26619    26619              
  Branches     4844     4844              
==========================================
+ Hits        19778    19787       +9     
+ Misses       5489     5478      -11     
- Partials     1352     1354       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Calculate malformed ELF section table bounds without overflowing the
promoted header fields or their offset sum. Document the local source
modification so it is preserved during vendor updates.

Fixes: https://github.com/getsentry/sentry-native/security/code-scanning/5
@jpnurmi
jpnurmi force-pushed the jpnurmi/fix/libunwind-section-table-overflow branch from 1c306b2 to ffcde13 Compare August 27, 2026 11:10
@jpnurmi

jpnurmi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

@jpnurmi jpnurmi closed this Aug 27, 2026
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