Merge pull request #2970 from magnumripper/master

Avoid false positives in pkzip formats
This commit is contained in:
Jens Steube
2021-09-09 16:57:50 +02:00
committed by GitHub
9 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -756,7 +756,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
@@ -982,7 +982,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
+2 -2
View File
@@ -758,7 +758,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
@@ -988,7 +988,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
+2 -2
View File
@@ -771,7 +771,7 @@ KERNEL_FQ void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
@@ -1013,7 +1013,7 @@ KERNEL_FQ void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) continue; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hash.uncompressed_length) continue;
const u32 r0 = ~infstream.crc32;
const u32 r1 = 0;
+2 -2
View File
@@ -757,7 +757,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
@@ -1022,7 +1022,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
+2 -2
View File
@@ -757,7 +757,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
@@ -1024,7 +1024,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
+2 -2
View File
@@ -769,7 +769,7 @@ KERNEL_FQ void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
@@ -1048,7 +1048,7 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
// we check the crc32, but it might not necessarily be the last one (depending how strict
if ((~infstream.crc32) == esalt_bufs[DIGESTS_OFFSET].hashes[idx].crc32)
+2 -2
View File
@@ -766,7 +766,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}
@@ -1094,7 +1094,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}
+2 -2
View File
@@ -766,7 +766,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}
@@ -1095,7 +1095,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}
+2 -2
View File
@@ -778,7 +778,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}
@@ -1119,7 +1119,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
ret = hc_inflate (&infstream);
}
if (ret != MZ_STREAM_END) break; // failed to inflate
if (ret != MZ_STREAM_END || infstream.total_out != esalt_bufs[DIGESTS_OFFSET].hashes[idx].uncompressed_length) break;
crc = ~infstream.crc32;
}