EC streamed GET forwards the remote part-0 parent header without checking it against the requested ID
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- backend, distributed-systems
Direzione di ricerca
Read pkg/services/object/get.go, especially copyRemotePart, handleGetECPartResponseInit, and the existing checkHeaderProtobufAgainstID calls in the proxy paths. Trace how the requested object ID and parent header reach the streamed response, then check nearby tests for streamed EC GET behavior. Done means a mismatched parent header makes that node fail so another part-0 holder can be tried, with a regression test covering the mismatch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Expected Behavior
When a storage node streams an EC object to a client (full GET, the default path through getECTransport), it forwards the parent header from part 0 only after checking that the header hashes to the requested object ID. The non-streamed paths already do this after #4290.
Current Behavior
copyRemotePart takes the parent ID, signature and header out of a remote node's part-0 response with handleGetECPartResponseInit and writes them straight to the client with writeInitGetResponseBuffers. Nothing compares the header with the requested ID:
- get.go#L660-L670: parent header from the response goes straight into the client's init message
- get.go#L810-L860:
handleGetECPartResponseInitonly reads payload lengths and the LINK type
The proxy paths check this with checkHeaderProtobufAgainstID (get.go#L262, server.go#L2532). #4290 added verifyParentHeaderID to the EC paths in pkg/services/object/get, but the streamed path lives in pkg/services/object/get.go, so it was not covered.
As a result, a container node that answers the part-0 request can make the serving node send another object's header with status OK. The node does not use that header for anything itself, unlike the cases in #4290. A conforming SDK client rejects the header when it checks the ID, but a client that skips checksum verification does not.
The local variant (CopyECParentHeaderAndPayloadFromLocalFirstPart, get.go#L342) reads from the node's own storage, where the part was validated on PUT. It is lower risk, but it has no check either.
Possible Solution
Before writeInitGetResponseBuffers in copyRemotePart, call checkHeaderProtobufAgainstID(parentHdr, x.requestObject, …) and treat a mismatch as a failure of that node, so the next holder of part 0 is tried.
Context
Found while analysing #4326. A payload check on the streamed path has to trust the parent's payload checksum and __NEOFS__EC_PART_HASHES, so it needs this header check first. Static analysis only, no reproduction yet.
Version: 0.58.2 (1f0d51b5d).
- Lingua principale
- Go
- Stelle
- 37
- Fork
- 56
- Merge medio
- 1g 18h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nspcc-dev/neofs-node
-
bug hal:proposed neofs-storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nspcc-dev/neofs-node#4325 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nspcc-dev/neofs-node#4311 ·
I maintainer di solito rispondono entro 1 giorno
-
Check alpha scope in IRApertahal:proposed I4 neofs-storage S3 security U4
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
nspcc-dev/neofs-node#4280 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug neofs-storage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
nspcc-dev/neofs-node#4332 ·
I maintainer di solito rispondono entro 1 giorno
-
bug hal:proposed neofs-storage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
nspcc-dev/neofs-node#4331 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nspcc-dev/neofs-node
Issue simili
-
Pin and verify Security Insights schema in lintinsights targetForse già presa @imshubham22apr-gif l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gemaraproj/gemara#618 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
a2aproject/a2a-go#597 ·
I maintainer di solito rispondono entro 1 giorno
-
scopes: GetAllowedTopics, GetProtectedTopics, and GetScopedTopics include empty topic names and do not trim whitespace charactersForse già presa @patelshivani2283-lab l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area/networking kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
siderolabs/talos#14972 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno