Infinite loop in jdk/test/sun/management/windows/revokeall

Ladislav Jahoda jahoda at aicas.de
Mon Oct 1 12:44:28 UTC 2018


Hello guys,

the revokeall utility has an infinite loop in its revokeAll method. Please note in the loop (line #344 in revokeall.c):

while (count > 0) {

the condition (line #354):

if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceType != ACCESS_ALLOWED_ACE_TYPE) {
     continue;
}

which loops forever if the condition is met. Note that the “count” counter needs to be decremented before the continue statement, that is:

if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceType != ACCESS_ALLOWED_ACE_TYPE) {
     count--;
     continue;
}

I checked the OpenJDK 8, 9 and 10, the bug is in all versions.

Thanks ahead for the fix,
Lada Jahoda


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/jtreg-use/attachments/20181001/6dc061be/attachment.html>


More information about the jtreg-use mailing list