Many cryptography techniques have been used to protect the privacy of vehicular ad hoc networks(VANETs). For example, the ring signature, one of the anonymous techniques by virtue of its unconditional anonymity, is widely used in VANETs for privacy protection. However, some of their cryptographic properties may have been weakened due to the characteristic of VANETs. In this paper, we study the impact of the influences of ring selection on the anonymity property of ring signature when applied to privacy protection in VANETs. Specifically, we introduce a novel ring selection attack aimed to compromise the anonymity of vehicles in VANETs. We then propose a ring selection algorithm based on the analysis of the ring selection attack. Furthermore, by taking the information entropy as the privacy metric, we develop a privacy analytic model to quantitatively investigate the privacy level achieved in the solution. Finally, the analytical results indicate that better privacy protection can be achieved when selecting ring members according to our ring selection algorithm.