What is a jailhouse lawyer? Here are some definitions.
Noun
(informal) A person incarcerated in a prison, jail, etc., who has acquired significant knowledge of the justice system and who is able to represent himself in some legal proceedings and to provide legal advice to other prisoners.