Ata bin Yasar narrates from Sayyiduna Abu Dharr (may Allah be pleased with him) that he said: I entered the mosque on Friday while the Prophet (peace and blessings be upon him) was delivering the sermon. I sat down near Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him), and the Prophet (peace and blessings be upon him) recited Surah Bara'ah. I asked Ubayy (may Allah be pleased with him): When was this surah revealed? He remained silent and did not speak to me. When the Prophet (peace and blessings be upon him) had completed his prayer, I said to Ubayy (may Allah be pleased with him): I asked you a question, and you brushed me aside and did not speak to me. Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) said: You will get nothing from your prayer except the idle talk you engaged in. I went to the Prophet (peace and blessings be upon him) and said: O Prophet of Allah! I was sitting beside Ubayy bin Ka'b (may Allah be pleased with him) while you (peace and blessings be upon him) were reciting Surah Bara'ah. I asked Ubayy bin Ka'b (may Allah be pleased with him): When was this surah revealed? He brushed me aside and did not speak, and then he said: Nothing of your prayer will come to your share except idle talk. The Prophet (peace and blessings be upon him) said: "Ubayy bin Ka'b has spoken the truth."
There is nothing in this chapter more authentic than the hadith whose chain we have mentioned, and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5832