-
Bug
-
Resolution: Fixed
-
P3
-
11, 12, 13
-
b17
-
x86
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8230866 | 11.0.6-oracle | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8229251 | 11.0.5 | David Holmes | P3 | Resolved | Fixed | b03 |
As reported by fanjinke51@yeah.net
http://mail.openjdk.java.net/pipermail/hotspot-dev/2019-April/037725.html
We have:
const char* VM_Version_Ext::cpu_family_description(void) {
int cpu_family_id = extended_cpu_family();
if (is_amd()) {
return _family_id_amd[cpu_family_id];
}
if (is_intel()) {
if (cpu_family_id == CPU_FAMILY_PENTIUMPRO) {
return cpu_model_description();
}
return _family_id_intel[cpu_family_id];
}
if (is_hygon()) {
return "Dhyana";
}
return "Unknown x86";
}
which indexes into the _family_id_xx arrays using the value returned by extended_cpu_family(). But there is no check that the index is within range as can happen with newer processes. For example AMD Zen will have an id of decimal 23, but the _family_id_amd array only has 17 entries.
We need to add new entries for AMD Zen and ensure no out-of-bound accesses.
http://mail.openjdk.java.net/pipermail/hotspot-dev/2019-April/037725.html
We have:
const char* VM_Version_Ext::cpu_family_description(void) {
int cpu_family_id = extended_cpu_family();
if (is_amd()) {
return _family_id_amd[cpu_family_id];
}
if (is_intel()) {
if (cpu_family_id == CPU_FAMILY_PENTIUMPRO) {
return cpu_model_description();
}
return _family_id_intel[cpu_family_id];
}
if (is_hygon()) {
return "Dhyana";
}
return "Unknown x86";
}
which indexes into the _family_id_xx arrays using the value returned by extended_cpu_family(). But there is no check that the index is within range as can happen with newer processes. For example AMD Zen will have an id of decimal 23, but the _family_id_amd array only has 17 entries.
We need to add new entries for AMD Zen and ensure no out-of-bound accesses.
- backported by
-
JDK-8229251 Out-of-bounds access to CPU _family_id_xxx array
-
- Resolved
-
-
JDK-8230866 Out-of-bounds access to CPU _family_id_xxx array
-
- Resolved
-