Can a Master student's thesis be kept indefinitely until the advisors have extracted everything the student has to give?
This is not strictly speaking a legal issue. There are generally internal university regulations that govern theses and dissertations, but enforcing them is not something that can be compelled through force of law.

There is normally a limit on the amount of time that can elapse for changes to be demanded, but this is entirely institution-dependent. Usually, though, any such period coincides with the conferral of the degree. At that point, the advisor and committee cannot ask for more changes.

All of that said, someone has committed derilection of duty in advising you. If there was a question about whether or not you were ready to defend, it should have been addressed before you wrote up the entire thesis and scheduled the defense. (It may have been the responsibility of a thesis committee, not the advisor, to make this decision. I don’t know without knowing more about the departmental regulations.)

Right now, I would talk to the other members of the committee, the chair of the graduate studies committee, and the chair of the department to figure out what can be done. This is not a good situation, and if your defense is scheduled for the near future, you may need to postpone it at least temporarily to avoid problems if your advisor is deadset on you redoing everything.