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)

{
    std::vector<bool> asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8);
    CAddrManTest addrman_asmap1(true, asmap1);
    CAddrManTest addrman_asmap1_dup(true, asmap1);
    CAddrManTest addrman_noasmap;
    CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
    CAddress addr = CAddress(ResolveService("250.1.1.1"), NODE_NONE);
    CNetAddr default_source;
    addrman_asmap1.Add(addr, default_source);
    stream << addrman_asmap1;
    
    stream >> addrman_asmap1_dup;
    std::pair<int, int> bucketAndEntry_asmap1 = addrman_asmap1.GetBucketAndEntry(addr);
    std::pair<int, int> bucketAndEntry_asmap1_dup = addrman_asmap1_dup.GetBucketAndEntry(addr);
    BOOST_CHECK(bucketAndEntry_asmap1.second != -1);
    BOOST_CHECK(bucketAndEntry_asmap1_dup.second != -1);
    BOOST_CHECK(bucketAndEntry_asmap1.first == bucketAndEntry_asmap1_dup.first);
    BOOST_CHECK(bucketAndEntry_asmap1.second == bucketAndEntry_asmap1_dup.second);
    
    stream << addrman_asmap1;
    stream >> addrman_noasmap;
    std::pair<int, int> bucketAndEntry_noasmap = addrman_noasmap.GetBucketAndEntry(addr);
    BOOST_CHECK(bucketAndEntry_noasmap.second != -1);
    BOOST_CHECK(bucketAndEntry_asmap1.first != bucketAndEntry_noasmap.first);
    BOOST_CHECK(bucketAndEntry_asmap1.second != bucketAndEntry_noasmap.second);