influxdb
influxdb copied to clipboard
fix: avoid panic when reading corrupt index in TSM file
… corrupt file)
Added check on indexOfsStart, to make index slice length fit in int32, and count should have >0 value otherwise it is corruption.
-
[x] CHANGELOG.md updated
-
[*] Rebased/mergable
-
[*] Tests pass
-
[*] Sign CLA (if not already signed)
-
Closes #
Required checklist
- [x] Sample config files updated (both
/etc
folder andNewDemoConfig
methods) (influxdb and plutonium) - [x] openapi swagger.yml updated (if modified API) - link openapi PR
- [x] Signed CLA (if not already signed)
Description
1-3 sentences describing the PR (or link to well written issue)
Context
Why was this added? What value does it add? What are risks/best practices?
Affected areas (delete section if not relevant):
List of user-visible changes. As a user, what would I need to see in docs? Examples: CLI commands, subcommands, and flags API changes Configuration (sample config blocks)
Severity (delete section if not relevant)
i.e., ("recommend to upgrade immediately", "upgrade at your leisure", etc.)
Note for reviewers:
Check the semantic commit type:
- Feat: a feature with user-visible changes
- Fix: a bug fix that we might tell a user “upgrade to get this fix for your issue”
- Chore: version bumps, internal doc (e.g. README) changes, code comment updates, code formatting fixes… must not be user facing (except dependency version changes)
- Build: build script changes, CI config changes, build tool updates
- Refactor: non-user-visible refactoring
- Check the PR title: we should be able to put this as a one-liner in the release notes
Added two checks for indexOfsStart,and count against corruption, to avoid influxdb exit with panic. on start. More details are here in issue #19916. The following PR is opened for 1.8 branch only, but it would be good to consider to include fix other branches as well.
@gggevorgyan I would like to merge this PR and for you to get credit for it, but we have some checks on commit messages that are failing. InfluxData requires that all commit messages meet semantic commit guidelines (https://www.conventionalcommits.org/en/v1.0.0/). Starting the commit message with fix:
should work. Would it be possible for you to rewrite the commit messages and then force push those to your pull request branch? Thanks!
Thank you @gwossum, I have added fix: prefixes to boith commits