A habeas corpus petition attacking a criminal conviction or sentence shall be filed within two years from the date of final judgment in the trial court. Under Virginia law, habeas corpus is a civil proceeding used to challenge and remedy due process violations.Habeas corpus is available to prisoners challenging their convictions and sentences. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Habeas corpus is perhaps the most critical writ available to prisoners for challenging criminal convictions and sentences in state and federal courts. Habeas corpus is perhaps the most critical writ available to prisoners for challenging criminal convictions and sentences in state and federal courts. - This Court may act on any petition for a writ of habeas corpus, mandamus, or prohibition before a responsive pleading or reply of the petitioner is filed. Habeas corpus often serves as a last resort for inmates who insist that the government unjustly imprisoned them. Limitations on Habeas Corpus. Habeas corpus is available to prisoners challenging their convictions and sentences.