Solution (source code)

= Solution
{c}

Apply <Itô's formula> to $\log X$ for positive initial value $x_0$. The drift correction is $-\sigma^2/2$, so
$$
\boxed{X_t=x_0\exp\{(\mu-\tfrac12\sigma^2)t+\sigma W_t\}.}
$$
This is <geometric Brownian motion>. Under the physical probability measure, $W_T/\sqrt T$ has the <standard normal distribution>. For positive volatility,
$$
\boxed{\mathbb P(X_T<m)=\Phi\left(\frac{\log(m/x_0)-(\mu-\sigma^2/2)T}{\sigma\sqrt T}\right).}
$$
The drift here is $\mu$, because this is a physical bankruptcy probability. The <risk-neutral measure> will instead give drift $r$ for pricing. If $\sigma=0$, the value is deterministic and the default probability is the indicator of $x_0e^{\mu T}<m$; the usual positive-volatility convention is used in the remaining formulas.