This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Use res instead of len as a third parameter in COMMON_INTERCEPTOR_WRITE_RANGE in recv and recvfrom interceptors.
ClosedPublic

Authored by m.ostapenko on Feb 25 2016, 7:23 AM.

Details

Summary

We should pass res as third parameter to COMMON_INTERCEPTOR_WRITE_RANGE , not len, because otherwise we can write to unrelated memory (in MSan) or get wrong report (in ASan);

Diff Detail

Repository
rL LLVM

Event Timeline

m.ostapenko retitled this revision from to [sanitizer] Use res instead of len as a third parameter in COMMON_INTERCEPTOR_WRITE_RANGE in recv and recvfrom interceptors..
m.ostapenko updated this object.
m.ostapenko added reviewers: kcc, samsonov, dvyukov.
m.ostapenko set the repository for this revision to rL LLVM.
m.ostapenko added subscribers: llvm-commits, ygribov.
dvyukov accepted this revision.Feb 25 2016, 7:28 AM
dvyukov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 25 2016, 7:28 AM
This revision was automatically updated to reflect the committed changes.