I'll tell you what the Bible says about itself. Whether you believe it or not is another question, but I'll quote a couple of scriptures which are actually in the Bible.
2 Tim 3:16,
All scripture [is] given by inspiration of God, and [is] profitable for doctrine, for reproof, for correction, for instruction in righteousness:
According to this verse Matthew, Mark, Luke, or John did not write what they heard from other people or what they themselves may or may not have heard. Instead they wrote what God told them to write. God knew what Jesus said, so if you believe the Bible, you can take the words of who said what to who to the bank.
2 Pet 1:20-21,
20 Knowing this first, that no prophecy of the scripture is of any private interpretation.
21 For the prophecy came not in old time by the will of man: but holy men of God spake [as they were] moved by the Holy Ghost.
We in the modern West think of "prophecy" as foretelling the future, but that is not how the word was used in the Bible (meanings of words do change over time, this being but one example). It can be foretelling, but it can also be forth-telling. In other words it's all prophecy and this verse says none of it was man's idea. The word "moved" in verse 21 is the Greek word "phero" and it meant "to be carried along."
Bottom line: if you take the Bible as being authored, not by 25 or so different people over the course of 1,500 years or so, but as coming straight from God then you can be sure that what the Bible claims Jesus said he actually said.
Take care.