Corrosion detection in conducting boundaries: II. Linearization, stability and discretization