Question: If my detached garage has natural gas connection to the house via a buried black pipe and if the house got caught on fire, can that pipe, say 25' in length, conduct the flame to the garage so that it catches on fire with no other source of ignition?

I was thinking that a buried pipe should not be able to do that because fire requires air, which is not available inside a buried pipe. Correct me if wrong.

Answer: 
A gas pipe is filled with nearly 100% flammable gas—at least under normal conditions.

Propane and natural gas need to be mixed with air (or oxygen) to be combustible. The [ideal combination](https://en.wikipedia.org/wiki/Stoichiometry#Stoichiometric_air-to-fuel_ratios_of_common_fuels) for natural gas is 1 part fuel (by volume) to 9.7 parts dry air. A mixture of more than 15% (1 to 6.67) natural gas is *not* combustible!

So, no. Under normal conditions, a flame applied to one end of the gas pipe would not be conducted anywhere.
The possibility of the natural gas line transmitting the fire is extremely close to zero. Yes natural gas requires air, about 20% mixture of gas and air (more air than gas). Getting that mixture in a closed pipe, along the entire pipe, would near impossible without some pre-mixing first before the fire.

Also if fires could be transmitted via the gas pipe lines, entire cities would be at risk if just one house caught fire.