One of the most significant challenges in cognitive radio networks is to design a framework in which the selfish secondary users are obliged to interact with each other truthfully. Moreover, due to the vulnerability of these networks against the jamming attack, providing the security defense is also challenging. In this paper, we investigate a dynamic stochastic medium consisting of some selfish secondary users and a malicious user. Each secondary user participates in an auction and wish to use the unjammed spectrum, and the malicious user aims at jamming a channel by corrupting the communication link. We design a truthful game amongst the secondary users. Furthermore, we propose a zero sum game between the whole set of secondary users and the malicious user. We prove that this problem can be converted to the randomized two-level auctions in which the first auction allocates the vacant channels, and then the second one assigns the remaining unallocated channels. This solution can be changed to a trustful distributed fashion. Finally, simulation results show that the distributed algorithm with much less complexity has almost similar performances to the centralized one.