A federal disrict court judge ruled that foreign suspects held by the US in Afghanistan have the right to challenge their detention in US civilian courts.