The only confidentiality the lawyer owes, are communications made by the client, while seeking legal advice, to the lawyer, that the client has not waived.
It is important to note that "evidence" is not protected. So if the client brings in a gun and tells the lawyer, "I used this gun to shoot someone." The comment the client made will be protected, but the gun has to be turned over to the DA, by law.
EDIT: It also depends on the state you are in. Some states have really strict confidentiality rules of ethics, like California. Other states, the rules are much less strict and if there is any communication made indicating a future crime or bodily injury or death to someone, the lawyer also can break their confidentiality.