First, I would suggest you read a bit about the history of the biblical text, its redaction, etc. It's important to understand the role played by the Masoretes in the making of the Masoretic texts which are used today, such as the Aleppo Codex.
What is the source (talmudic or otherwise) for this concept?
Traditionally, there were a number of different theories as to the values of the kri u'ktiv and its origins:
- Rav Saadia Gaon says that both kri and ktiv are important for understanding the text.
- Rabbi David Kimchi (Radak) similarly believed that both kri and ktiv were essential to the text. He says that they represent alternative texts of the Bible which arose during the first Babylonian exile. When people were unable to determine the correct version of the text among the variants, they choose to keep both. (Reference: Introduction of Radak to Book of Yehoshua, last few lines of the page).
- Rabbi Avraham Ibn Ezra almost exclusively finds value in the Kri and ignores the Ktiv. He considers the Kri to be the true intention of the text. He sees the Kri as an indication by the Masoretes of how to understand otherwise non-normative uses of Hebrew in the Ktiv.
- Abarbanel also prefers the Kri over the Ktiv. He offers two explanations for this phenomenon: 1) He suggests that Ezra and the sages (Anshei Knesset HaGdola) had Moshe's original Torah, but they found words that were difficult to understand, perhaps indicative of hidden meanings, etc. but added the Kri in order to provide a simple meaning to the text. 2) Regarding the phenomenon elsewhere in the Tanach, he considers them to be artifacts of the speakers and authors. For instance, Yechezkel wrote down his prophesies and recorded his speeches and his discussions with others, and the original ktiv reflects the natural but incomplete way in which people speak. The Kri are the amendments by Ezra to help the reader understand the original intention. (Reference: Introduction of Abarbanel to the Book of Yirmiyahu , middle of left column , also p. 295, left column...).
A number of modern researchers have proposed the following theories:
- The kri is a fix by the Masoretes to mistakes they found in the ktiv. (Yehoshua Meir Grintz p. 61, Gutholf Bergshterser p. 29). This theory is problematic because the Masoretes did not see themselves as introducing independent changes, but rather simply preserving what was passed down. Also, it happens often enough that the ktiv is in fact more understandable than the kri (ex. Genesis 8:17). Finally, word A sometimes appears as a ktiv for word B, and in another passage word B can appear as a ktiv for word B. (ex. Exodus 16:2, Numbers 14:36).
- The kri and ktiv are based on different versions of the text that was passed down and then checked against one another. (H. M. Orlinsky, The Origin of the Kethid-Qere System: A New Approach, VTS 7, 1960, p. 184-192) It seems unlikely though that there were exactly only two textual variants for a given kri u'ktiv.
- A compromise position which says that kri u'ktiv originally served as a way of making slight additions, like for using more euphemistic language when deemed necessary (e.g. yishagelna/yishkavna). Later, kri u'ktiv was expanded to include textual variants. According to this theory, the three texts of the Torah used in the Beit HaMikdash (Masechet Sofrim 6:4, Yerushalmi Taanit 4:2, Avot D'Rabbi Natan 46, Sifrei Dvarim 33:27 356) were considered as the original source texts and differences between these three were noted in the kri u'ktiv. (R. Gordis, The Biblical Text in the Making: a Study of Kethid-Qere, Philadelphia, 1971, p. 465, 456) The difficulty in this position is that the Masoretes had to make lots of decisions when writing their codices -- why would they suddenly choose to maintain record these differences, while all other aspects they simply decided without leaving any relevant footnotes, references, etc.
- Another suggestion is that the Ktiv reflects the written tradition, but the Kri represents a separate oral tradition which was passed down through the generations in parallel. (Broyer p. 9; S Levin) The difficulty with this suggestion is explaining how the oral tradition ever diverged from the written tradition in the first place.
- Aharon ben Asher, the Masorete who authored the Keter codex (considered the most reliable ever made), states, 'One does not contradict the other, but rather they are complementary.' (Sefer Dikdukei HaTaamim LeRabbi Aharon ben Moshe ben Asher, page 9). A modern author who bases his analysis on this theory is Maimon Kohen. His basic thesis is that they reflect variations of dialect, morphology, phonology... which existed in the Hebrew language at the time. The Ktiv might have one version, and the Kri will serve as an alternative form. The kri and ktiv texts mean the same thing, they're simply reflective of the unsettled nature of Biblical Hebrew with its many variant declensions, local dialects, etc. Most of this answer is based on his book -- I find it highly informative and recommend it strongly to anyone with an interest in Biblical Hebrew (albeit very technical in the areas of grammar and phonology).
Is there a halachik source that contains a full list of all kri/ktiv
pairing in all of tanach?
No. The number instances of kri u'ktiv simply depends on which codex of the Bible you're referring to. The codex with the smallest number has about 800, while the codex with the largest has about 1,500. The differences between the occurrences in the codices come down to differences in the methodologies by which the different Masoretes worked. (I Yivin, 'Kri u'ktiv', Encyclopedia of the Bible, p. 262-263; E Tov, Bikoret Nusach HaMikra)