bitcoin-abc icon indicating copy to clipboard operation
bitcoin-abc copied to clipboard

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

Open weigp1 opened this issue 5 months ago • 2 comments

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"

weigp1 avatar Aug 20 '25 04:08 weigp1

Thanks for reporting. We will update the code to better handle fclose() errors. Please note that this does not improve data integrity but improve error reporting when data might have failed to be written to disk.

Fabcien avatar Aug 20 '25 08:08 Fabcien

I don't know what I'm doing its overwhelming, what is this and why am I doing it. I'm homeless broke and have congestive heart failure. I don't get it. Please help me understand I'm so sorry.

1elsa1 avatar Aug 31 '25 22:08 1elsa1