The law generally protects the gesture as freedom of speech.
Which is not to say that it’s a good idea.
In a 2013 case called Swartz v. Insogna, the U.S. Court of Appeals’ Second Circuit decided in favor of a man who extended his middle finger at a policeman who was tracking cars with a radar gun.
The officer followed the man, pulled him over and arrested him for disorderly conduct.
At the appellate court, the driver won, hands down.
The judges’ unanimous decision said, in part: “This ancient gesture of insult is not the basis for a reasonable suspicion of a traffic violation or impending criminal activity.”