Various parsing bugs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Start by reading the tar parser code that handles pax headers and numeric fields; the issue does not name specific files or tests. Use the linked N27, N28, F14, N20, F37, F29, and F30 cases to reproduce the reported behavior. Done means the parser handles each case according to the described POSIX behavior and rejects or correctly interprets invalid numeric values.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm working on a test suite tar-minefield for tar file parsing (docs: stoppels.ch/tar), with the ultimate goal to ensure implementations converge on similar behavior, reducing parser differential vulnerabilities.
During this work, I found a few bugs in Haskell's tar.
Related to pax headers:
- A pax header with both
pathandlinkpathdropspath. Test cases: N27 (symlink) and N28 (hard link). In this test case, GNU tar, libarchive, Python, Go and others extract a file with a 120-character name, while Haskell'starproduces one with 100 chars. - The pax
sizeis ignored. POSIX: "This record shall override the size field in the following header block(s)". See F14. - For a repeated keyword, the first record wins, but according to POSIX: "When extended header records conflict, the last one given in the header shall take precedence". See N20.
Related to parsing of numeric fields:
8and9are accepted as octal digits, so a size of00000000090is read as 72, where GNU tar, libarchive, Python and most others refuse it. See F37.- A negative base-256 number is read as positive, so size of -512 becomes 512. See F29.
- A base-256 number that doesn't fit in 64 bits wraps around. See F30.
- Lingua principale
- Haskell
- Stelle
- 42
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 haskell/tar
-
Drop support for older GHCs.Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
convert to `PosixPath`Forse già presa @hasufell l’ha presa 1090 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
haskell/bytestring#730 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
seal-harness/seal-harness#399 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
reflex-frp/reflex#563 ·