Sayyiduna Abu Barzah al-Aslami (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "The buyer and the seller both have the option to cancel the deal as long as they have not separated."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10439