The only way the IAF would not cross an Arab country is the long over-water route between Saudi Arabia and Egypt. Between the length of the route and having to do aerial refueling, the operation would have been detected, LONG before it arrived over Iran. Also, had the IAF used that route they would have flown over almost all of Iran, twice, for the attacks in northern Iran.
So, yeah, the IAF probably overflew Syria and Iraq. The Iranians had worked with Assad (or been allies) so as to supply weapons and people to Hezbollah in Lebanon, so the recently victorious rebel groups probably do not much like Iran. As for Iraq, they're working to be a PITA to the US who freed them from Saddam, but the 1980s Iran-Iraq War probably has enduring scars among Iraq's leaders and people. Consequently, Iraq probably would not mind their former enemy's military getting decapitated, flayed, and eviscerated. All that is just my guesses.
BTW, I learned last night that Israel did notify Trump in advance of their impending attack. How much in advance I have not heard, but Israel has to be careful of there possibly being LIEden-era Israel-Haters in mid-level positions in the WH.