<div dir="ltr">Adding Alexey Utkin, who appears to be the author of the lines I am proposing to modify. Alexey, you are invited to take ownership of this fix.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Aug 21, 2013 at 3:43 PM, Martin Buchholz <span dir="ltr"><<a href="mailto:martinrb@google.com" target="_blank">martinrb@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi security team,</div><div><br></div>There's some code in ProcessBuilder.java to avoid leaking data in case ProcessBuilder.start fails.<div>It appears to have an obvious bug, with an obvious fix.</div>
<div><br></div><div><a href="http://cr.openjdk.java.net/~martin/webrevs/openjdk8/ProcessBuilder-checkRead/" target="_blank">http://cr.openjdk.java.net/~martin/webrevs/openjdk8/ProcessBuilder-checkRead/</a><br></div><div>
<br></div><div>checkRead is spec'ed to throw SecurityException, not <span style="white-space:pre-wrap">AccessControlException. If checkRead does throw SecurityException, then start will throw the wrong exception.</span></div>
<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Untested.</span></div><div><pre style="white-space:pre-wrap;word-wrap:break-word">@@ -1033,9 +1033,9 @@
// Can not disclose the fail reason for read-protected files.
try {
security.checkRead(prog);
- } catch (AccessControlException ace) {
+ } catch (SecurityException e) {
exceptionInfo = "";
- cause = ace;
+ cause = e;
}
}
// It's much easier for us to create a high-quality error</pre></div></div>
</blockquote></div><br></div>