Language:
كتاب الفتن
92  
Afflictions and the End of the World
(2)
Chapter: “After me you will see things which you will disapprove of.”
(2)
باب قَوْلِ النَّبِيِّ صلى الله عليه وسلم ‏"‏ سَتَرَوْنَ بَعْدِي أُمُورًا تُنْكِرُونَهَا ‏"‏
Sahih al-Bukhari 7053

Narrated Ibn `Abbas:

The Prophet (ﷺ) said, "Whoever disapproves of something done by his ruler then he should be patient, for whoever disobeys the ruler even a little (little = a span) will die as those who died in the Pre-lslamic Period of Ignorance. (i.e. as rebellious Sinners).

حَدَّثَنَا مُسَدَّدٌ، عَنْ عَبْدِ الْوَارِثِ، عَنِ الْجَعْدِ، عَنْ أَبِي رَجَاءٍ، عَنِ ابْنِ عَبَّاسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ كَرِهَ مِنْ أَمِيرِهِ شَيْئًا فَلْيَصْبِرْ، فَإِنَّهُ مَنْ خَرَجَ مِنَ السُّلْطَانِ شِبْرًا مَاتَ مِيتَةً جَاهِلِيَّةً ‏"‏‏.‏
Reference : Sahih al-Bukhari 7053
In-book reference : Book 92, Hadith 6
USC-MSA web (English) reference : Vol. 9, Book 88, Hadith 176
  (deprecated numbering scheme)