This is an archive of the discontinued LLVM Phabricator instance.

[DFSan] Add custom wrapper for recvmsg.
ClosedPublic

Authored by morehouse on Dec 9 2020, 10:51 AM.

Details

Summary

The wrapper clears shadow for anything written by recvmsg.

Diff Detail

Event Timeline

morehouse requested review of this revision.Dec 9 2020, 10:51 AM
morehouse created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2020, 10:51 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
compiler-rt/lib/dfsan/dfsan_custom.cpp
894

If msg is from users' inputs, can iov_len be < 0?

https://linux.die.net/man/2/recvmsg does not say what happens in this case.

morehouse marked an inline comment as done.Dec 9 2020, 12:55 PM
morehouse added inline comments.
compiler-rt/lib/dfsan/dfsan_custom.cpp
894

iov_len is size_t, which is never negative.

This revision is now accepted and ready to land.Dec 9 2020, 12:56 PM
This revision was landed with ongoing or failed builds.Dec 9 2020, 1:08 PM
This revision was automatically updated to reflect the committed changes.
morehouse marked an inline comment as done.