JVM backend swallows tainted eval security errors under -T
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with RuntimeCode.rejectTaintedEval and the EVAL_STRING opcode's eval-block handler, then compare how the interpreter backend propagates the error. Reproduce the failure with Text-Template 1.61's t/taint.t under -T on the JVM backend. Done means the tainted eval security error escapes the attempted eval and the eight JVM failures pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The JVM backend lets a string eval catch the taint-mode security error raised for tainted eval source. Under system Perl, the error propagates out of that inner eval; the interpreter backend also propagates it. In the JVM backend, the eval failure is instead captured as $@, allowing the caller to treat the tainted template fragment as an ordinary template error and continue.
This discrepancy causes eight failures in Text-Template 1.61's t/taint.t on the JVM backend, while the same test passes on the interpreter backend and all 21 tests pass under system Perl 5.42.2. The regression is included in archived CPAN run 20261104-151051-20617.
Root cause
RuntimeCode.rejectTaintedEval raises PerlCompilerException for tainted eval source while taint mode is active. In the JVM execution path, the EVAL_STRING opcode's surrounding eval-block handler catches that exception and calls WarnDie.catchEval, converting the forbidden inner-eval compilation into an ordinary $@ result. Perl's taint rule requires this particular security error to escape the eval whose source is tainted so an enclosing eval (or caller) sees the failure. The interpreter path already has the expected propagation behavior.
Expected behavior
An eval of tainted source under -T must not suppress its own taint violation. A caller may catch the propagated error outside the attempted eval, but the attempted eval itself must not turn it into a normal recoverable $@ result.
- Lingua principale
- Perl
- Stelle
- 65
- Fork
- 8
- Merge medio
- 5h 45m
- PR unite (30g)
- 184
Preparare l'ambiente
- Include un Dockerfile o un 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 fglock/PerlOnJava
-
area:runtime documentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#1579 ·
I maintainer di solito rispondono entro 1 giorno
-
area:runtime bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
fglock/PerlOnJava#1980 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:parser bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
fglock/PerlOnJava#1979 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
fglock/PerlOnJava#1962 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
fglock/PerlOnJava#1961 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
ai-driven-fuzzing bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linagora/lemonldap-ng-plugins#170 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
wave-followup
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100