Page MenuHomePhabricator

[DFSan] Fix parameters to strtoull wrapper.
ClosedPublic

Authored by morehouse on Aug 13 2020, 2:21 PM.

Details

Summary

base and nptr_label were swapped, which meant we were passing nptr's
shadow as the base to the operation. Usually, the shadow is 0, which
causes strtoull to guess the correct base from the string prefix (e.g.,
0x means base-16 and 0 means base-8), hiding this bug. Adjust the test
case to expose the bug.

Diff Detail

Event Timeline

morehouse created this revision.Aug 13 2020, 2:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2020, 2:21 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
morehouse requested review of this revision.Aug 13 2020, 2:21 PM
vitalybuka accepted this revision.Aug 13 2020, 8:43 PM

How did you find this?

This revision is now accepted and ready to land.Aug 13 2020, 8:43 PM

The DFMapper folks hit it during their DFSan experiments.

This revision was landed with ongoing or failed builds.Aug 14 2020, 8:02 AM
This revision was automatically updated to reflect the committed changes.