minio/internal/ioutil
Klaus Post 6c89a81af4
Fix CreateFile shared buffer corruption. (#18652)
`(*xlStorageDiskIDCheck).CreateFile` wraps the incoming reader in `xioutil.NewDeadlineReader`.

The wrapped reader is handed to `(*xlStorage).CreateFile`. This performs a Read call via `writeAllDirect`, 
which reads into an `ODirectPool` buffer.

`(*DeadlineReader).Read` spawns an async read into the buffer. If a timeout is hit while reading, 
the read operation returns to `writeAllDirect`. The operation returns an error and the buffer is reused.

However, if the async `Read` call unblocks, it will write to the now recycled buffer.

Fix: Remove the `DeadlineReader` - it is inherently unsafe. Instead, rely on the network timeouts. 
This is not a disk timeout, anyway.

Regression in https://github.com/minio/minio/pull/17745
2023-12-14 10:51:57 -08:00
..
append-file_nix.go run gofumpt cleanup across code-base (#14015) 2022-01-02 09:15:06 -08:00
append-file_windows.go run gofumpt cleanup across code-base (#14015) 2022-01-02 09:15:06 -08:00
discard.go replace io.Discard usage to fix some NUMA copy() latencies (#18394) 2023-11-06 14:26:08 -08:00
hardlimitreader.go Signed trailers for signature v4 (#16484) 2023-05-05 19:53:12 -07:00
ioutil.go Fix CreateFile shared buffer corruption. (#18652) 2023-12-14 10:51:57 -08:00
ioutil_test.go Fix CreateFile shared buffer corruption. (#18652) 2023-12-14 10:51:57 -08:00
read_file.go fix: remove ODirectReader entirely since we do not need it anymore (#18619) 2023-12-09 10:17:51 -08:00
read_file_noatime_notsupported.go fix: enable go1.17 github ci/cd (#12997) 2021-08-18 18:35:22 -07:00
read_file_noatime_supported.go fix: enable go1.17 github ci/cd (#12997) 2021-08-18 18:35:22 -07:00
wait_pipe.go protect wg.Done from being called twice (#17075) 2023-04-27 07:55:36 -07:00