In option pricing, volatility naturally appeared through the Black-Scholes (BS) model where it was a coefficient for the linear diffusion term $\sigma S\,\mathrm dW_t$, and as such represented the time-scaled Standard Deviation (SD) of log-returns: $$ \mathrm{Var}[\log S_t] = \mathrm{Var}[\sigma W_t] = (\sigma \sqrt t)^2. $$ In particular, if $T$ is maturity, the SD of the log-return on the initial investment $S_0$ is given by $\sigma \sqrt T$. Due to imprecision of the BS model, one deals with the BS Implied Volatility (IV) which fits the market prices of vanilla options with BS formula. The IV surface can thus have a pretty general shape, and we can compute the implied distribution of $S_T$ given the market prices of the option. I thus wonder, whether the SD of $S_T$ given by implied distribution can be computed in terms of IV surface, and whether it can happen that for some IV surfaces the SD is infinite.
Edit: just to clarify my question. Let us assume that the expiry $T$, interest rate $r$ and current underlying level $S$ are fixed. Denote by $\sigma(K)$ the IV smile at time $T$. If $C(K,\sigma)$ denotes the price of a European call with a strike $K$, volatility $\sigma$ and other parameters given above, then the implied distribution of $S_T$ has density $$ f(K) = \frac{\mathrm d^2}{\mathrm d K^2}C(K,\sigma(K)) $$ and hence the SD of $\log S_T$ is finite iff $$ \int_0^\infty (\log x)^2f(x)\mathrm dx <\infty. $$ My question is whether there is a choice of $\sigma(K)$ which turns the latter integral to be infinite, but yet satisfies all necessary non-arbitrage conditions (non-negative vertical spreads etc.)