Skip to content

[stable-3.17] fix(checksums): avoid crash on aborted checksum calculation job - #9096

Merged
nilsding merged 1 commit into
stable-3.17from
backport/9039/stable-3.17
Nov 18, 2025
Merged

[stable-3.17] fix(checksums): avoid crash on aborted checksum calculation job#9096
nilsding merged 1 commit into
stable-3.17from
backport/9039/stable-3.17

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 18, 2025

Copy link
Copy Markdown

Backport of PR #9039

@backportbot
backportbot Bot requested a review from camilasan November 18, 2025 08:05
@backportbot backportbot Bot added this to the 3.17.4 milestone Nov 18, 2025
In case a propagation job is aborted while it's about to start computing
the content checksum in a thread, the thread could still be started and
attempting to call `_checksumCalculator->calculate()`.  As the job was
aborted the ComputeChecksum instance has already been deleted along with
its ChecksumCalculator instance, and the thread ends up calling
`calculate()` on an invalid pointer.

I managed to occasionally reproduce this through:

    auto computeChecksum = new ComputeChecksum();
    computeChecksum->setChecksumType("MD5");
    computeChecksum->start("/dev/zero");
    delete computeChecksum;

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-9096.zip

Digest: sha256:f84d64928b14fbcd5e6aceafb1f6560bf4c00d0390ed45df1ede820ace5d0f8a

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@nilsding
nilsding enabled auto-merge November 18, 2025 08:24
@nilsding
nilsding merged commit da419b0 into stable-3.17 Nov 18, 2025
16 checks passed
@nilsding
nilsding deleted the backport/9039/stable-3.17 branch November 18, 2025 08:24
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants