It is legal to go faster than the speed limit when passing another vehicle.

It is always unlawful to exceed the posted speed limit, even when passing another vehicle.
DMV Writen Test