Selling subdomains is no joke. If you have to ask about it at a forum it means you are not ready for something like this.
You need dedicated server(s) and server admin(s) at least to pull that off.
A great server admin can advise you how to set up your dns server to handle that.
Legal aspects can be taken care of by a proper ToS drafted by a professional lawyer. However, you bigger concern would be not what your clients do, but what you do to your clients, in case you shut down the service and people have built a business on that.