Cameron made the comments on the British television show "This Morning" after he was handed a list of suspected child abusers by host Phillip Schofield, The Daily Telegraph reported.
Schofield said he had assembled the list after spending "about three minutes" on the Internet.
Cameron did not look at the list, but commented: "I've heard all sorts of names being banded about."
"There is a danger, if we're not careful, that this can turn into a sort of witch-hunt, particularly against people who are gay," Cameron added.
Cameron said it was important anyone with information about a pedophile, "no matter how high up in the country or whether they are alive or dead," go to the police.
The prime minister has promised to look into a number of recent allegations about child abuse, including that a member of Parliament raped a 13-year-old boy in Wales in the 1970s.
The British public has recently been sensitized to the subject of child sex abuse after reports surfaced that celebrity TV personality Savile abused children before his death in October 2011. Police investigating the allegations believe he may have abused hundreds of children.
Notable deaths of 2014 [PHOTOS]