Given a linear elliptic equation a ij u ij = 0 in R 3 , it is a classical problem to determine if its order-one homogeneous solutions u are linear. The answer is negative in general, by a construction of Martinez-Maure. In contrast, the answer is affirmative in the uniformly elliptic case, by a theorem of Han, Nadirashvili and Yuan, and it is a known open problem to determine the degenerate ellipticity condition on (a ij ) under which this theorem still holds. In this paper we solve this problem. We prove the linearity of u under the following degenerate ellipticity condition for (a ij ), which is sharp by Martinez-Maure example: if K denotes the ratio between the largest and smallest eigenvalues of (a ij ), we assume K| O lies in L 1 loc , where O ⊂ S 2 is a connected open set that intersects any configuration of four disjoint closed geodesic arcs of length π in S 2 . Our results also give the sharpest possible version under which an old conjecture by Alexandrov, Koutroufiotis and Nirenberg (disproved by Martinez-Maure's example) holds.