What happens if you receive a block with an unknown previous hash in the header
Blocks with an unknown parent block are stored in the orphan block pool. They will stay there until the parent block is received and then linked to the existing chain. 

As far as I know, there's no other condition for the block to be removed from the pool. If the particular parent is never received, they will remain there forever.

The current difficulty should be enough to prevent people from spamming this pool with orphans, because that would require a lot a processing power and a huge waste of money. A block has to be valid to be stored in this pool, block hash has to meet target and so on. If that is not the case, the block is discarded and will not spam the orphan pool.

See Mastering Bitcoin, Chapter 10, Section Assembling and Selecting Chains of Blocks for detailed explanation.