JVM backend swallows tainted eval security errors under -T
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Perl
- 星标
- 65
- 派生
- 8
- 平均合并
- 5 小时 45 分钟
- 30 天内合并 PR
- 184
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
area:runtime documentation enhancement
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
area:runtime bug
难度 4/5 3-5 天 新手友好度 57/100
fglock/PerlOnJava#1980 · 1 条评论 ·
维护者通常 1 天内回复
-
area:parser bug
难度 4/5 3-5 天 新手友好度 48/100
fglock/PerlOnJava#1979 · 1 条评论 ·
维护者通常 1 天内回复
-
area:cpan-port bug
难度 5/5 一周以上 新手友好度 35/100
fglock/PerlOnJava#1962 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
fglock/PerlOnJava#1961 · 1 条评论 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
ai-driven-fuzzing bug claude Minor
难度 2/5 1-3 小时 新手友好度 72/100
linagora/lemonldap-ng-plugins#170 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
wave-followup
难度 2/5 1-3 小时 新手友好度 74/100