Technically, crossing the double yellow lines into an oncoming lane is illegal to pass, even if it's a cyclist they are passing. It's why they painted the lines. People do it and get away with it. Considering the circumstances, I have no issue with it if safely performed , no harm no foul doctrine, but it's definitely against the law. Most don't realize that maintaining your lane and thus right of way and most of your problems never happen and when they do, you'll be right in the rules of the road and laws.