Bitcoin-ABC / Bitcoin-ABC/bitcoin-abc

fix: data integrity risk from unhandled fclose(3) failures

Open
#577 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
788
PR merge metrics
No merged PRs in 30d

Description

## Problem
Bitcoin-abc has the same security issue described in https://github.com/bitcoin/bitcoin/pull/29307.
`fclose(3)` failure may prevent previously written data from being properly flushed to disk. Current code ignores `fclose(3)` failures, leaving file close errors undetected and unhandled.

## Upstream Fix
PR https://github.com/bitcoin/bitcoin/pull/29307: "util: explicitly close all AutoFiles that have been written"

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked upstream Bitcoin PR and searching this repository for AutoFiles that have been written. Trace how those files are currently closed and how fclose(3) failures are handled. Done means written AutoFiles are explicitly closed and close failures are no longer ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.