All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If you know that the goods are stolen, you are obliged to return them to the person from whom they were stolen if you know him and you are able to return them to him, otherwise you should donate them in charity on behalf of their owner or donate their price in charity on his behalf if you had consumed them. Then, you should ask the seller (the thief) to give you back the price of these goods but it is not permissible for you to return them to him.
Allaah Knows best.