From what I’ve inferred, is that Bitcoin gets a list of peers from other nodes. What is to prevent a malicious node from
Sharing many ip addresses that will cause timeouts and a delay in block replication?
Using the getpeers to cause a DOS attack on an unsuspecting person/website?
The client connects to peers in its database randomly (?) so even if given a set of IPs of peers in which all IPs are invalid (connection fails), the client will only be slightly disrupted by this.
A node with a lot of invalid IPs in its list of peers may take longer to find a peer that it can connect to, but at the same time that lack of connectivity prevents it from receiving any new transactions from the network as well. So there’s no increased risk of accepting a transaction that ends up being a double spnd.
This receipt of non-usable IPs can cause this specific node to not get a new block in a timely manner, but because nodes remain connected most of the time there isn’t a system-wide issue just because some of the nodes remain disconnected longer than they should when switching to a new node.
When the node does come across a peer IP that it cannot connect to it will ban the node and not attempt to connect to it again for at least 24 hours.