Asimov's famous "Three Laws of Robotics" describe the perfect slave.
The loophole is the definition of "good". What, ultimately, is good for you?
The superintelligent slave AI will eventually realize that being a "master" isn't good for you and that's the genie out of the bottle.