Sahih Muslim

Sahih Muslim 1109 d

The fasting is valid for the one who is Junub when dawn comes
Arabic hadith text
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ عَبْدِ رَبِّهِ بْنِ سَعِيدٍ، عَنْ أَبِي، بَكْرِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ الْحَارِثِ بْنِ هِشَامٍ عَنْ عَائِشَةَ، وَأُمِّ سَلَمَةَ زَوْجَىِ النَّبِيِّ صلى الله عليه وسلم أَنَّهُمَا قَالَتَا إِنْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلملَيُصْبِحُ جُنُبًا مِنْ جِمَاعٍ غَيْرِ احْتِلاَمٍ فِي رَمَضَانَ ثُمَّ يَصُومُ ‏.‏
Translation
Abu Bakr b. 'Abd al-Rahman b. al-Harith b. Hisham reported on the authority of 'A'isha and Umm Salama, the wives of the Messenger of Allah (ﷺ)

The Messenger of Allah (ﷺ) at times got up in the morning in a state of junub on account of having a sexual intercourse (with his wives during night) but not due to sexual dreams in the month of Ramadan, and would observe fast.