Yes it is if you are in an airplane that is not certified for aerobatics. Violating FAA safety regulations is a criminal offence. However, the enforceability of such regulations at several thousand feet and in remote places being somewhat problematic, a good many Cessnas, Cherokees, Cirruses and their ilk have, in fact, been rolled-or so I would surmise, never having seen it done myself.
Minor violations will in most cases only result in an enforcement action (stays on the airman’s record for at least 5 years), but serious safety violations will result in civil criminal prosecution.