The prisoners ' lawsuits challenge the legality of their confinement at the prison .