reproduce CVE-2018-17144 (inflation bug) on regtest for learning
No, that's incorrect, there is two types of double spend:


single transaction spending the same utxo
multiple transaction spending the same utxo


CheckTransaction() which is called by CheckBlock() only validate the first case, not the second, the second is done by both Consensus::CheckTxInputs and CheckInputs(),

if you look at the code in CheckTransaction, it only check whether there are duplicated vins exists in the same transaction, it doesn't know whether the vins has been spent in another transaction.