Ruling on fasting the days of al-tashreeq
Question

A man fasted on the eleventh and twelfth of Dhu’l-Hijjah. What is the ruling on his fast?.
Praise be to Allah.The eleventh, twelfth and thirteenth of Dhu’l-Hijjah are known as the days of al-Tashreeq. It is proven that the Prophet (peace and blessings of Allah be upon him) forbade fasting on these days, and he did not give any concession allowing fasting on these days except to those pilgrims doing tamattu’ or qiraan who could not find an animal to sacrifice. 
Muslim (1141) narrated that Nubayshah al-Hudhali (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “The days of al-Tashreeq are the days of eating, drinking and remembering Allah.” 
Ahmad (16081) narrated from Hamzah ibn ‘Amr al-Aslami (may Allah be pleased with him) that he saw a man on a camel following the people in Mina, and the Prophet of Allah (peace and blessings of Allah be upon him) was present, and the man was saying, “Do not fast on these days for they are the days of eating and drinking.” Classed as saheeh by al-Albani in Saheeh al-Jaami’, 7355. 
Ahmad (17314) and Abu Dawood (2418) narrated from Abu Murrah the freed slave of Umm Haani’ that he entered with ‘Abd-Allah ibn ‘Amr upon his father ‘Amr ibn al-‘Aas. He offered them food and said, “Eat.” He said: “I am fasting.” ‘Amr said: “Eat, for these are the days on which the Messenger of Allah (peace and blessings of Allah be upon him) commanded us not to fast, and he forbade fasting on these days.” Maalik said: “Those are the days of al-Tashreeq.” Classed as saheeh by al-Albani in Saheeh Abi Dawood. 
Ahmad (1459) narrated that Sa’d ibn Abi Waqqaas (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) commanded me to call out on the days of Mina: “These are the days of eating and drinking, and there is no fasting on these days,” meaning the days of al-Tashreeq. The editor of the Musnad said it is saheeh li ghayrihi. 
Al-Bukhari (1998) narrated that ‘Aa’ishah and Ibn ‘Umar (may Allah be pleased with them) said: “No concession was granted allowing anyone to fast on the days of al-Tashreeq, except for the (pilgrim) who could not find a sacrificial animal.” 
These ahaadeeth and others indicate that it is forbidden to fast on the days of al-Tashreeq. 
Hence most of the scholars are of the view that it is not valid to observe voluntary fasts on these days. 
But if one is fasting to make up a missed Ramadan fast, some of the scholars are of the view that that is permissible, but the correct view is that it is not permissible. 
Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (3/51): 
It is not permissible to observe a voluntary fast on these days, according to the majority of scholars. It was narrated from Ibn al-Zubayr that he used to fast on these days, and something similar was narrated from Ibn ‘Umar and al-Aswad ibn Yazeed. It was narrated from Abu Talhah that he used not to break his fast except on the two Eid days. It seems that these people had not heard that the Messenger of Allah (peace and blessings of Allah be upon him) forbade fasting on these days, and if they had heard of that, they would not have done that again. 
As for observing an obligatory fast on those days, there are two views. One is that it is not permitted, because it is forbidden to fast on those days, and they are likened to the day of Eid.  
The other view is that an obligatory fast observed on those days is valid, because it was narrated that Ibn ‘Umar and ‘Aa’ishah said: “No concession was granted allowing anyone to fast on the days of al-Tashreeq, except for the (pilgrim) who could not find a sacrificial animal” – i.e., for pilgrims doing tamattu’ if they cannot find a sacrificial animal. This is a saheeh hadeeth which was narrated by al-Bukhari and is applied by analogy to all obligatory fasts. End quote. 
The view adopted by the Hanbali madhhab is that fasts observed on these days to make up for missed Ramadan fasts are not valid. 
See Kashshaaf al-Qinaa’, 2/342 
With regard to pilgrims doing qiraan and tamattu’ on these days if they cannot find a sacrificial animal, the evidence for that is the hadeeth of ‘Aa’ishah and Ibn ‘Umar quoted above. This is the also the view of the Maalikis, Hanbalis and the older Shaafa’i madhhab. 
The Hanafis and Shaafa’is are of the view that it is not permissible to fast on these days. 
See al-Mawsoo’ah al-Fiqhiyyah, 7/323 
The most correct view is the first view, which is that it is permissible to fast on these days for the (pilgrim) who cannot find a sacrificial animal. 
Al-Nawawi said in al-Majmoo’ (6/486): 
It should be noted that the more correct view according to our companions is the later view that it is not valid to fast on these days at all, either for the pilgrim doing tamattu’ or for anyone else. The most correct view based on the evidence is that it is valid for the pilgrim doing tamattu’ and it is permissible for him, because the hadeeth which grants this concession is saheeh as we have explained, and it clearly states that so it cannot be ignored.” End quote. 
To sum up: it is not valid to fast on the days of al-Tashreeq, whether that is a voluntary fast or an obligatory fast, except for pilgrims doing tamattu’ or qiraan, if they cannot find a sacrificial animal. 
Shaykh Ibn Baz (may Allah have mercy on him) said: It is not permissible to fast on the thirteenth of Dhu’l-Hijjah, whether that is a voluntary fast or an obligatory fast, because these are the days of eating and drinking and remembering Allah.  The Prophet (peace and blessings of Allah be upon him) forbade fasting on these days and did not grant a concession to anyone except for pilgrims doing tamattu’ who could not find a sacrificial animal. 
Majmoo’ Fatawa Ibn Baz (15/381) 
Shaykh Ibn ‘Uthaymeen said: 
The days of al-Tashreeq are the three days after Eid al-Adha. They are called the days of al-Tashreeq because the people used to dry (yusharriqoon) the meat in the sun so that it would not turn rotten when they stored it. The Messenger of Allah (peace and blessings of Allah be upon him) said concerning these three days: “The days of al-Tashreeq are the days of eating, drinking and remembering Allah.” As that is the case, i.e., their prescribed purpose in sharee’ah is for eating and drinking and remembering Allah, then this is not a time for fasting. Hence Ibn ‘Umar and ‘Aa’ishah (may Allah be pleased with them) said: “No concession was granted allowing anyone to fast on the days of al-Tashreeq, except for the (pilgrim) who could not find a sacrificial animal” – i.e., those pilgrims who are doing tamattu’ and qiraan; they should fast for three days during Hajj and seven days when they go back home. If the pilgrim doing qiraan or tamattu’ cannot find a sacrificial animal, it is permissible for him to fast on these three days, so that the Hajj season will not end before he can fast them. Apart from that, it is not permissible to fast on these days; even if a person is obliged to fast two consecutive months, he must break his fast on the day of Eid and the three days after that, then he must resume his fast. End quote. 
Majmoo’ Fatawa Ibn ‘Uthaymeen, 20/question no. 419 
Based on the above, whoever fasted on the days of al-Tashreeq, all or some of them, and was not a pilgrim doing tamattu or qiraan who could not find a sacrificial animal, must ask Allah for forgiveness for doing something that the Prophet (peace and blessings of Allah be upon him) forbade. If he fasted on those days to make up for missed Ramadan fasts, that does not count and he must make it up again.
And Allah knows best.