Actions
Bug #7713
openfabric-xlate fmd(1m) module isn't 64-bit safe
Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2016-12-30
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:
Description
The fabric-xlate module causes fmd(1m) to segfault. The offending code is in usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c:
if (tbl->reg_size == 16) { reg = (uint32_t)*((uint16_t *) ((uint32_t)data + tbl->reg_offset)); } else { reg = *((uint32_t *)((uint32_t)data + tbl->reg_offset)); }
tbl->reg_offset is the offset of a field member within the data struct, the uint32_t cast will truncate 64-bit addresses (and is just plain the wrong type).
Updated by Joshua M. Clulow over 4 years ago
Actions