UN Convention on Laws of the Sea (UNCLOS) defines international transit thru straits among other rules. Free transit of innocent passage is guaranteed by all signatories. As someone who has refueled in the straits of Gibraltar because the Spanish wouldn’t approve overflight, it applies to air transit.