gh-140739: Fix crashes from corrupted remote memory (#143190)

7 files changed