Cognitive radio based cooperative spectrum sensing (CSS) is severely affected when some secondary users maliciously attack it. Two attacks regarded as key adversaries to the success of CSS are spectrum sensing data falsification (SSDF) and primary user emulation attack (PUEA). Defending SSDF and PUEAs has received significant attention in research in the past decade globally. This paper performs a state-of-the-art comprehensive survey of the researches on defending SSDF and PUEAs. First, the preliminaries like Hypothesis testing for detecting the primary user and different models of CSS are discussed briefly. Then a categorization of the defence mechanisms for defending both the attacks has been proposed as active and passive. Active mechanisms are suitable for an immediate defence in a limited time span, while passive mechanisms are suitable for flexible CSS systems that are ready to detect the attacks over a period of time and suppress them permanently by bringing changes in their underlying operations. An in-depth tutorial on both the defence mechanisms is provided from the perspectives of the secondary users throughput and the interference to the primary user. Finally, a detailed survey on the open research problems in this area and some possible solutions has been performed.