The problem was originally reported in https://github.com/bitcoin/bitcoin/issues/22450#issuecomment-880629375. This is a dedicated issue to track it independently because it is a different problem than the one reported in #22450 OP/description.

```
fuzz: addrman.cpp:149: void CAddrMan::SwapRandom(unsigned int, unsigned int): Assertion `nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()' failed.
```

To reproduce:
```sh
FUZZ=addrman_deserialize ./src/test/fuzz/fuzz /tmp/crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log
```
[crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log](https://github.com/bitcoin/bitcoin/files/6830072/crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log)

addr_info_newport.port = I2P_SAM31_PORT;
            const auto bucket_target = addr_info_newport.GetTriedBucket(nKey, m_asmap);
            const auto i_target = addr_info_newport.GetBucketPosition(nKey, false, bucket_target);
            if (bucket_target == bucket && i_target == i) { 
                addr_info = addr_info_newport;
                continue;
            }
            
            
            const auto old_target_id = vvTried[bucket_target][i_target];
            if (old_target_id != -1) {
                CAddrInfo& old_target_info = mapInfo[old_target_id];
                old_target_info.fInTried = false;
                vvTried[bucket_target][i_target] = -1;
                --nTried;
                const auto new_bucket = old_target_info.GetNewBucket(nKey, m_asmap);
                const auto new_bucket_i = old_target_info.GetBucketPosition(nKey, true, new_bucket);
                ClearNew(new_bucket, new_bucket_i);
                old_target_info.nRefCount = 1;
                vvNew[new_bucket][new_bucket_i] = old_target_id;
                ++nNew;
            }
            vvTried[bucket_target][i_target] = id;
            vvTried[bucket][i] = -1;
            addr_info = addr_info_newport;
        }
    }
}