Noticed this in my code review: https://petertodd.org/2016/segwit-consensus-critical-code-review#peer-to-peer-networking

Basically it looks like an attacker may be able to send nodes transactions with malleated witness data, which we don't consistently mark as possibly corrupted in AcceptToMemoryPool(). Result would be those txids being added to recentRejects, messing up propagation.

That said, I haven't actually tested this yet; about to go off to a conference, so if someone else wants to confirm for me that'd be much appreciated! Or if I'm wrong you're welcome to all laugh at my expense. :)

CC: @sdaftuar @sipa 

if (it->second->nHeight < chainActive.Height() - 15) {
            LogPrint("net", "Peer %d sent us a getblocktxn for a block > 15 deep", pfrom->id);
            return true;
        }
        CBlock block;
        assert(ReadBlockFromDisk(block, it->second, chainparams.GetConsensus()));
        BlockTransactions resp(req);
        for (size_t i = 0; i < req.indexes.size(); i++) {
            if (req.indexes[i] >= block.vtx.size()) {
                Misbehaving(pfrom->GetId(), 100);
                LogPrintf("Peer %d sent us a getblocktxn with out-of-bounds tx indices", pfrom->id);
                return true;
            }
            resp.txn[i] = block.vtx[req.indexes[i]];
        }
        pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCKTXN, resp);
    }
    else if (strCommand == NetMsgType::GETHEADERS)
    {
        CBlockLocator locator;
        uint256 hashStop;
        vRecv >> locator >> hashStop;
        LOCK(cs_main);
        if (IsInitialBlockDownload() && !pfrom->fWhitelisted) {
            LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id);
            return true;
        }
        CNodeState *nodestate = State(pfrom->GetId());
        CBlockIndex* pindex = NULL;
        if (locator.IsNull())