This is a patch by Will Dietz that I dusted off and would like to try to get accepted. It teaches UBSan about overflowing pointers. Will wrote a blog post about using it:
There is a corresponding compiler-rt patch that I'll submit next.
Not really sure who to add as reviewers for this, suggestions welcome.