Skip to content

filed: detect integer overflow during backup#1952

Merged
BareosBot merged 7 commits intobareos:masterfrom
pstorz:dev/pstorz/master/detect_fileindex_overflow
Nov 19, 2024
Merged

filed: detect integer overflow during backup#1952
BareosBot merged 7 commits intobareos:masterfrom
pstorz:dev/pstorz/master/detect_fileindex_overflow

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Sep 11, 2024

The filedaemon now makes sure that the fileindex does not overflow during the backup. The upper limit for file indices is currently 2^(31) - 1, but we now also build a test file daemon that has this limit set to 20, so that we can actually test the overflow detection.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@pstorz pstorz force-pushed the dev/pstorz/master/detect_fileindex_overflow branch from f19534d to cfefb11 Compare September 11, 2024 14:21
@pstorz pstorz added this to the 24.0.0 milestone Sep 12, 2024
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add checks to ::SendBaseFileList and ::SendDeletedList; either they should check for the return value of EncodeAndSendAttributes or they should check if the job was canceled and stop.

Maybe even both.

@pstorz pstorz force-pushed the dev/pstorz/master/detect_fileindex_overflow branch 2 times, most recently from d77891e to 968fcf6 Compare October 23, 2024 15:22
@sebsura sebsura force-pushed the dev/pstorz/master/detect_fileindex_overflow branch from 33fa3fc to 008560c Compare November 14, 2024 12:25
@sebsura sebsura changed the title fileindex handling: detect integer overflow filed: detect integer overflow during backup Nov 18, 2024
@pstorz pstorz force-pushed the dev/pstorz/master/detect_fileindex_overflow branch from d75f307 to 4ea7387 Compare November 19, 2024 08:57
@BareosBot BareosBot force-pushed the dev/pstorz/master/detect_fileindex_overflow branch from dd67859 to 680cb33 Compare November 19, 2024 19:08
@BareosBot BareosBot merged commit 0742beb into bareos:master Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants