Smoothness dependent stability in corrosion detection