Sunan Ibn Majah, Book 24, Hadith 116 (Ibn Majah 2870)

It was narrated that ‘Attab, the freed slave of Hurmuz, said:

“I heard Anas bin Malik say: ‘We gave our pledge to the Messenger of Allah (ﷺ) on the basis that we would listen and obey. He (ﷺ) said: “As much as you can.”