Solution (source code)

= Solution

Let $x$ be the cylinder centre's small displacement away from the wall. Rolling without slipping gives rotation angle of magnitude $x/r$. The material point initially at the top moves horizontally by another $x$ relative to the centre to first order, so the spring extension is \b[$2x$], not $x$. Its small vertical displacement affects the extension only at higher order.

The kinetic and potential energies are
$$
T=\frac12m\dot x^2+\frac12\left(\frac12mr^2\right)\frac{\dot x^2}{r^2}
=\frac34m\dot x^2,\qquad
U=\frac12k(2x)^2=2kx^2.
$$
The linearized equation is $(3m/2)\ddot x+4kx=0$, giving
$$
\boxed{\omega=\sqrt{\frac{8k}{3m}}.}
$$
Static friction enforces the rolling constraint and does no work at the instantaneous contact point. Omitting <rotational kinetic energy>, or attaching the spring to the centre instead of the top material point, would change the result.