The device-to-device (D2D) communications has been recently proposed for reducing the cellular network traffic by directly connecting the local nodes. In this paper, we consider a cellular based primary network co-existing with a cognitive D2D pair. The primary network consists of a BS and multiple traditional cellular users which can sell their spectrum to the D2D user. In addition, under low interference conditions, the spectrum can be simultaneously shared between cellular users and D2D capable users, which is called non-orthogonal sharing mode (NOS). Therefore, in the auction, the D2D transmitter has three types of service providers (SP) or sharing modes. The SPs are operating on different frequency spectrums and a D2D capable pair intends to share these spectrums. This situation is formulated as a auction game where a D2D transmitter bids a demand curve and each SP offers a supply curve. The Nash equilibrium point of the auction game is obtained analytically.