A confession is (usually) taken after the court finishes its pre-trialing stage. There is a weightage and importance of such confession determined before the calculation of the gravity score of such crime.
If the attorney somehow (fakely) proves Fred as the killer, Mark is declared innocent, and later on its discovered that Fred is innocent; the court can take some action against Fred.
It would be first checked whether was Fred in a logical state of mind or not. If being manipulated by Mark, it would not be their fault of Fred. The court will also most likely see the age of the confessor to determine the importance of this. Here is a source from the National Registry of Exonerations which states the age of crime, and the percentage of groups with false crime declarations:
One reason is that minors can be easily psychologically manipulated, and so by chance Fred if under 18 would not be considered to give any worth of confession unless proven to go against him.
In some cases, the individual who made the false confession may be charged with perjury or obstruction of justice, particularly if their false confession led to an innocent person being convicted or if their false testimony impeded an ongoing investigation when the individual is not a minor. This is covered by perjury, a crime of expressing fake statements. In United States Code, Chapter 79 of Section 1632, it states:
(1) having taken an oath before a competent tribunal, officer, or person, in any case in which a law of the United States authorizes an oath to be administered, that he will testify, declare, depose, or certify truly, or that any written testimony, declaration, deposition, or certificate by him subscribed, is true, willfully and contrary to such oath states or subscribes any material matter which he does not believe to be true; or
in any declaration, certificate, verification, or statement under penalty of perjury as permitted under section 1746 of title 28, United States Code, willfully subscribes as true any material matter which he does not believe to be true;
is guilty of perjury and shall, except as otherwise expressly provided by law, be fined under this title or imprisoned not more than five years, or both. This section is applicable whether the statement or subscription is made within or without the United States.
The following law only applies to a sensible adult, who has intentionally, without a psychological circumstance, made a false statement to defend someone. It is hard later, for the prosecutor to prove the claimant innocent if the confession has solid ground and worth.
Note that though false confession can come under perjury crime, an exemption exists for minors or those psychologically unwell or influenced. It reminds us of Miranda v Arizona, where Miranda, an inmate in prison cased over by Phoenix Police (Credits:@TannerSwett) who would torture an innocent inmate to confess a crime. In collective terms, it was called Miranda Warnings, where the inmate was warned, using torture to confess fakely.
It would be clear from torture. In the 1936 case Brown v. Mississippi, which was the first time the Supreme Court excluded a confession from a state court prosecution, this was the issue. For days, three suspects had been tortured. The deputy in charge testified when asked how hard one of the defendants had been whipped: Not too much for a Black person; not nearly as much as I would have done if I had been in charge.
An image of courtesy, The Crisis Magazine 1935:
The Supreme Court passed American reforms where Miranda was passed, and torturing was banned with evidence for both interrogation and confession. At the time Miranda was written, more "modern" methods of questioning were being used: rather than beating, isolation, deception, and exhaustion. It seems unlikely that an innocent suspect would confess to a serious crime if they were not subjected to torture or other forms of violence or death threats. Confessions are extremely potent forms of proof of guilt for precisely this reason.
To sum up, we conclude:
- If Fred was a stable adult, he is punished under the perjury crime
- If Fred is a minor or not stable psychologically, he is dismissed with no legal action taken against him