Sayyiduna Salamah bin Sakhr al-Bayadi (may Allah be pleased with him) narrates: I was a man with a very great desire for women; I did not see any man who was afflicted with what I was afflicted with (that is, in desire). When Ramadan began, I made zihar from my wife until Ramadan was over. One night while she was sitting with me talking, the cloth slipped off her body, and I had intercourse with her. In the morning I told my people and said to them: Ask the Messenger of Allah (peace and blessings be upon him) for me. They said: We will not do this, for either the Qur'an will be revealed about us, or the Messenger of Allah (peace and blessings be upon him) will say something that will remain a disgrace for us. But we leave you to your situation; go yourself and explain your condition to the Prophet (peace and blessings be upon him). He said: I came to the Prophet (peace and blessings be upon him) and told him, and he (peace and blessings be upon him) asked: "Are you the one?" I said: O Messenger of Allah (peace and blessings be upon him), I am the one, and I submit patiently to Allah's ruling upon me. He (peace and blessings be upon him) said: "Free a slave." He said: I said: By Allah who sent you (peace and blessings be upon him) with the truth, I own nothing but this neck of mine. He (peace and blessings be upon him) said: "Fast two consecutive months." I said: O Messenger of Allah (peace and blessings be upon him), this affliction came upon me only because of fasting. He (peace and blessings be upon him) said: "Feed sixty poor people." He said: I said: By Allah who sent you (peace and blessings be upon him) with the truth, last night we had nothing to eat. He (peace and blessings be upon him) said: "Go to the one who collects the charity of Banu Zurayq and tell him to give the charity to you; then feed sixty poor people from it and benefit from the rest yourself."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الظهار / 15257