Technically, because you are still on duty, they are permitted to add a reposition flight to your schedule as long as it fits within your duty time. There is nothing illegal about that. Or they could deadhead you to an overnight at 2359. There is nothing about keeping you on duty if there is no flying to do. It is actually to the company's detriment to do so because they could put you to a min rest and put you back on airport reserve or short call the next day. Keeping you there is not in violation of any regulation. It isn't a lot of fun, I agree. That would be a contractual thing and not a rest issue.