Short answer
Not in the sense the words suggest. The Buddhist texts use their own word, dukkha, which means suffering and also unsatisfactoriness. The first sermon calls birth, old age, illness and death dukkha. The Dhammapada says that all conditions are dukkha. Yet the same texts admit that pleasant feeling is real. Islam does not say that all life is suffering. Its answer is that life is a test, with good in it and hardship in it. Both faiths agree that this world passes away. The real difference is the remedy. Buddhism says to end craving and the cycle of rebirth. The Qur'an says to turn the heart to the One who does not pass away. All that is on earth will perish, but the Face of your Lord will abide.
Full explanation
What the first sermon means by dukkha
Buddhism has two great branches. Theravada follows the Pali texts, and Mahayana adds further sutras. This page quotes the Pali texts, which Theravada holds to be the Buddha's word. In the first sermon, as these texts tell it, the Buddha names the noble truth of suffering. Rebirth, old age, illness and death are suffering. So are being joined to what one dislikes, being parted from what one likes, and not getting what one wants. In brief, he says, the five grasping aggregates are suffering. These are the five parts of a person that one clings to as "mine": form (the body), feeling, perception, choices and consciousness. The word is dukkha, and it is wider than pain. It means suffering, and it means the unsatisfying nature of anything that comes and goes. Another sutta, a discourse, says that form is pleasurable, and that this is why beings are drawn to it. It says too that form is painful, and that this is why they grow disillusioned. So the texts do not say that every moment hurts.
“Now this is the noble truth of suffering. Rebirth is suffering; old age is suffering; illness is suffering; death is suffering; being coupled with the disliked is suffering; separation from the liked is suffering; not getting what you wish for is suffering. In brief, the five grasping aggregates are suffering.”
“Mahāli, if form were absolutely painful—soaked and steeped in pain and not steeped in pleasure—sentient beings wouldn't be aroused by it. But because form is pleasurable—soaked and steeped in pleasure and not steeped in pain—sentient beings are aroused by it. Since they are aroused by it, they're caught up in it, and so they become corrupted.”
“Mahāli, if form was absolutely pleasurable—soaked and steeped in pleasure and not steeped in pain—sentient beings wouldn't grow disillusioned with it. But because form is painful—soaked and steeped in pain and not steeped in pleasure—sentient beings do grow disillusioned with it. Being disillusioned, desire fades away. When desire fades away they are purified.”
All conditions are impermanent and suffering
The Dhammapada is a collection of verses that Theravada holds to be the Buddha's teaching. Verse 277 says that all conditions are impermanent. Verse 278 says that all conditions are suffering. Here "conditions" means things that are put together by causes and then pass away. In both verses, one who sees this with wisdom grows disillusioned with suffering, and this is the path to purity. So the Buddhist claim is wide. It is about everything that comes and goes, and it does not describe a mood.
“All conditions are impermanent— when this is seen with wisdom, one grows disillusioned with suffering: this is the path to purity.”
“All conditions are suffering— when this is seen with wisdom, one grows disillusioned with suffering: this is the path to purity.”
Where the two agree: this world passes
Islam does not dispute that the world passes. The Qur'an calls the life of this world play and amusement, show, and rivalry in riches and children. It compares it to rain that brings up growth, which turns yellow, dries and crumbles away. It says that all on earth will perish. Here the Qur'an and the Dhammapada speak alike: what comes and goes cannot be the heart's last home. They begin to part when they ask what the heart should do about it.
“Know ye (all), that the life of this world is but play and amusement, pomp and mutual boasting and multiplying, (in rivalry) among yourselves, riches and children. Here is a similitude: How rain and the growth which it brings forth, delight (the hearts of) the tillers; soon it withers; thou wilt see it grow yellow; then it becomes dry and crumbles away. But in the Hereafter is a Penalty severe (for the devotees of wrong). And Forgiveness from Allah and (His) Good Pleasure (for the devotees of Allah). And what is the life of this world, but goods and chattels of deception?”
“All that is on earth will perish: But will abide (for ever) the Face of thy Lord,- full of Majesty, Bounty and Honour.”
“All conditions are impermanent— when this is seen with wisdom, one grows disillusioned with suffering: this is the path to purity.”
Where they part: the remedy
The first sermon names the cause of suffering as craving. It names the end of suffering as the fading away of that same craving, with nothing left behind. It also says that this craving leads to future lives, so ending it ends the cycle of rebirth. The Qur'an gives a different remedy. All on earth will perish, but the Face of your Lord will abide. So the heart is turned from what passes to the One who does not pass away. The Qur'an also says where the heart finds rest: in remembering Allah (﷾). It does not ask a person to cut desire out. It asks him to restrain the soul from lower desires, and it promises the Garden to the one who does.
“Now this is the noble truth of the origin of suffering. It's the craving that leads to future lives, mixed up with relishing and greed, taking pleasure there wherever it alights. That is, craving for sensual pleasures, craving for continued existence, and craving for nonexistence. Now this is the noble truth of the cessation of suffering. It's the fading away and cessation of that very same craving no residue left behind; giving it away, letting it go, releasing it, and not clinging to it.”
“All that is on earth will perish: But will abide (for ever) the Face of thy Lord,- full of Majesty, Bounty and Honour.”
“"Those who believe, and whose hearts find satisfaction in the remembrance of Allah: for without doubt in the remembrance of Allah do hearts find satisfaction.”
“And for such as had entertained the fear of standing before their Lord's (tribunal) and had restrained (their) soul from lower desires, Their abode will be the Garden.”
Not by leaving home
The two also part on where the path is best walked. The Buddha gave lay people five precepts to keep. But the Pali texts rank the homeless life higher. A householder who hears the teaching reflects: "Life at home is cramped and dirty, life gone forth is wide open. It's not easy for someone living at home to lead the spiritual life utterly full and pure, like a polished shell." So he gives up his wealth and his family circle, shaves his head and puts on robes. The Buddha himself went forth from home as a young man. Islam has no higher path that leaves the family behind. The Qur'an says that God (﷾) sent messengers before Muhammad (ﷺ) "and appointed for them wives and children". It says that the monasticism some later followers invented was not prescribed by God (﷾). Three men once vowed to pray all night for ever, to fast without a break and never to marry. The Prophet (ﷺ) told them that he feared Allah (﷾) more than they did, yet he fasted and broke his fast, prayed and slept, and married. Whoever turns from his way, he said, is not of him. He did stay in the mosque for worship in the last ten days of Ramadan, to the end of his life, so retreat has its place, for a time. He was a husband, a father, a judge and a leader, and the Qur'an calls him "a beautiful pattern (of conduct)". His way can be lived by anyone, at home and in every part of life.
“It’s when a noble disciple doesn’t kill living creatures, steal, commit sexual misconduct, lie, or consume intoxicants of beer, wine, and liquor.”
“Life at home is cramped and dirty, life gone forth is wide open. It's not easy for someone living at home to lead the spiritual life utterly full and pure, like a polished shell.”
“I shaved off my hair and beard, dressed in ocher robes, and went forth from the lay life to homelessness.”
“We did send messengers before thee, and appointed for them wives and children: and it was never the part of a messenger to bring a sign except as Allah permitted (or commanded). For each period is a Book (revealed).”
“Then, in their wake, We followed them up with (others of) Our messengers: We sent after them Jesus the son of Mary, and bestowed on him the Gospel; and We ordained in the hearts of those who followed him Compassion and Mercy. But the Monasticism which they invented for themselves, We did not prescribe for them: (We commanded) only the seeking for the Good Pleasure of Allah; but that they did not foster as they should have done. Yet We bestowed, on those among them who believed, their (due) reward, but many of them are rebellious transgressors.”
Anas ibn Malik reports that three men asked about the Prophet's (ﷺ) worship and thought their own too little. One vowed to pray all night for ever, one to fast every day without a break, and one to keep away from women and never marry. The Prophet told them that he feared Allah more than they did, yet he fasted and broke his fast, prayed and slept, and married. Whoever turns away from his way, he said, is not of him.
Aisha, the wife of the Prophet (ﷺ), reports that he used to stay in the mosque for worship (i'tikaf) in the last ten days of Ramadan until Allah took his soul, and that his wives kept the same practice after him.
“But no, by the Lord, they can have no (real) Faith, until they make thee judge in all disputes between them, and find in their souls no resistance against Thy decisions, but accept them with the fullest conviction.”
“Ye have indeed in the Messenger of Allah a beautiful pattern (of conduct) for any one whose hope is in Allah and the Final Day, and who engages much in the Praise of Allah.”
Life is a test, with good in it and hardship in it
The Qur'an does not say that all life is suffering. It says that God (﷾) created death and life to try which of us is best in deed. It says that He tests people by good as well as by evil. The good things of this world are the beautiful gifts of Allah (﷾), and no one has the right to forbid them. The Prophet (ﷺ) said that the affair of the believer is wonderful, because all of it is good for him. In ease he gives thanks, and in hardship he is patient. Here the two faiths differ. The first sermon teaches a middle way between indulgence and self-torment. Yet the Pali texts count everything that passes as dukkha in the end. Another sutta says that pleasure is what draws beings in and binds them. Islam calls the good things of life gifts of Allah (﷾) and a test of thanks.
“He Who created Death and Life, that He may try which of you is best in deed: and He is the Exalted in Might, Oft-Forgiving;-”
“Every soul shall have a taste of death: and We test you by evil and by good by way of trial. to Us must ye return.”
“Say: Who hath forbidden the beautiful (gifts) of Allah, which He hath produced for His servants, and the things, clean and pure, (which He hath provided) for sustenance? Say: They are, in the life of this world, for those who believe, (and) purely for them on the Day of Judgment. Thus do We explain the signs in detail for those who understand.”
Suhayb reports that the Prophet (ﷺ) said the affair of the believer is wonderful, for there is good for him in all of it, and this is so for no one but the believer: if something pleasing happens he gives thanks, and that is good for him; if hardship strikes he is patient, and that is good for him.
“Mendicants, these two extremes should not be cultivated by one gone forth. What two? Indulgence in sensual pleasures, which is low, crude, ordinary, ignoble, and pointless. And indulgence in self-mortification, which is painful, ignoble, and pointless.”
“Mahāli, if form were absolutely painful—soaked and steeped in pain and not steeped in pleasure—sentient beings wouldn't be aroused by it. But because form is pleasurable—soaked and steeped in pleasure and not steeped in pain—sentient beings are aroused by it. Since they are aroused by it, they're caught up in it, and so they become corrupted.”
“All conditions are suffering— when this is seen with wisdom, one grows disillusioned with suffering: this is the path to purity.”
Hardship is real, and it is not wasted
Islam does not call pain unreal. The Qur'an says that believers will be tested with fear, hunger and loss. It praises those who say "To Allah we belong, and to Him is our return". The Prophet (ﷺ) said that no tiredness, illness, sorrow or harm reaches a Muslim, even the prick of a thorn. Each time, Allah (﷾) wipes away some of his sins by it. The Qur'an says that with every difficulty there is relief. It also tells the believer where to seek help: with patience and prayer. The page "Why does God allow suffering?" takes up the reasons for pain in full.
“Be sure we shall test you with something of fear and hunger, some loss in goods or lives or the fruits (of your toil), but give glad tidings to those who patiently persevere, Who say, when afflicted with calamity: "To Allah We belong, and to Him is our return":- They are those on whom (Descend) blessings from Allah, and Mercy, and they are the ones that receive guidance.”
Abu Sa'id al-Khudri and Abu Hurayra report that the Prophet (ﷺ) said no tiredness, illness, sorrow, sadness, hurt or distress reaches a Muslim, not even the prick of a thorn, without Allah wiping away some of his sins because of it.
“So, verily, with every difficulty, there is relief: Verily, with every difficulty there is relief.”
“O ye who believe! seek help with patient perseverance and prayer; for Allah is with those who patiently persevere.”
A whole way of life, and an invitation
Islam answers a grieving heart with belief, worship and character together. That means faith in the Lord who remains, prayer, remembrance, patience and thanks. The Qur'an says that Muhammad (ﷺ) was sent as a mercy to all creatures. It does not ask to be taken on trust. It asks the reader to consider it with care. And it says that it would hold much contradiction if it were not from God (﷾). Muslims invite every reader, Buddhists too, to look at the Qur'an, and at the last Prophet (ﷺ) who brought it.
“We sent thee not, but as a Mercy for all creatures.”
“Do they not consider the Qur'an (with care)? Had it been from other Than Allah, they would surely have found therein Much discrepancy.”
Six replies answered
Samyutta Nikaya 56.11 — Linked Discourses, chapter 56, discourse 11 (Rolling Forth the Wheel of Dhamma), segments 4.1-4.2
“Now this is the noble truth of suffering. Rebirth is suffering; old age is suffering; illness is suffering; death is suffering; being coupled with the disliked is suffering; separation from the liked is suffering; not getting what you wish for is suffering. In brief, the five grasping aggregates are suffering.”
Cited for
The Buddha never said that all life is suffering. Dukkha means unsatisfactoriness, and the first truth speaks of the five grasping aggregates. Your title sets up a strawman.
The response
That is fair, and this page begins there. The title is what people ask, so it stays, but the answer starts from the Buddha's own words. Dukkha is wider than pain, and the texts admit that pleasant feeling is real (SN 22.60). Islam does not say that all life is suffering either. It says that life is a test by good and by evil (21:35), and that this world passes (57:20).
Where it lands — Both say the world passes, and that dukkha is not constant pain. The difference is what the heart is told to do about it.
Samyutta Nikaya 22.60 — Linked Discourses, chapter 22, discourse 60 (With Mahali), segments 5.1-5.3
“Mahāli, if form were absolutely painful—soaked and steeped in pain and not steeped in pleasure—sentient beings wouldn't be aroused by it. But because form is pleasurable—soaked and steeped in pleasure and not steeped in pain—sentient beings are aroused by it. Since they are aroused by it, they're caught up in it, and so they become corrupted.”
Cited for
Pleasure is real, but it is the very thing that draws us into craving. Enjoying the good things of life only binds us tighter to the round of rebirth.
The response
Islam warns against being drawn away by the fleeting life from the Hereafter (75:20-21). But it does not call the good things of life a snare. It calls them the beautiful gifts of Allah (7:32). The Prophet (ﷺ) said that in ease the believer gives thanks, and that this is good for him. The danger is forgetting the Giver, and not the gift.
Where it lands — Buddhism counts passing pleasure as dukkha in the end. Islam treats it as a gift, and as a test of thanks.
Dhammapada 278 — The Path, verse 278
“All conditions are suffering— when this is seen with wisdom, one grows disillusioned with suffering: this is the path to purity.”
Cited for
All conditions are suffering, and your Paradise is a condition too. Whatever is made must pass, so it cannot be the end of suffering.
The response
The Qur'an agrees that all on earth will perish, and it names what abides: the Face of the Lord (55:26-27). Of Paradise it says that no fatigue touches its people and that they will never be asked to leave (15:48). Whether nirvana is better than Paradise is taken up on the page "Is nirvana better than Paradise?"
Where it lands — Islam grants that everything on earth passes, and points to what abides.
Samyutta Nikaya 56.11 — Linked Discourses, chapter 56, discourse 11 (Rolling Forth the Wheel of Dhamma), segments 4.3-4.7
“Now this is the noble truth of the origin of suffering. It's the craving that leads to future lives, mixed up with relishing and greed, taking pleasure there wherever it alights. That is, craving for sensual pleasures, craving for continued existence, and craving for nonexistence. Now this is the noble truth of the cessation of suffering. It's the fading away and cessation of that very same craving no residue left behind; giving it away, letting it go, releasing it, and not clinging to it.”
Cited for
Wanting to be with God is craving for continued existence. You have swapped one craving for another.
The response
The Pali texts do not condemn every desire. Ananda says the goal of the Buddha's path is to give up desire. Yet the path itself is walked with desire for that goal, which fades when the goal is reached (SN 51.15). A Buddhist may say this is wholesome wish (chanda), not craving (tanha). Islam draws a like line. It condemns loving the fleeting life and leaving the Hereafter (75:20-21), restrains the soul from lower desires (79:40-41), and praises love of Allah (2:165). Craving, in the first sermon, is "taking pleasure there wherever it alights": it moves from one thing to the next. In Paradise its people wish for no change (18:107-108).
Where it lands — The quarrel is over what the heart seeks. Both warn against clinging to what passes, and Islam names the One who remains (55:26-27).
Dhammapada 276 — The Path, verse 276
“You yourselves must do the work, the Realized Ones just show the way.”
Cited for
The Buddhas only show the way, and we walk it ourselves. Islam's turning to God leans on another instead of doing the work.
The response
Islam also holds each soul to its own work. God (﷾) burdens no soul beyond its strength, and each gets the good it earns (2:286). But it does not leave a person alone in the work. It tells him to seek help with patient perseverance and prayer, for Allah (﷾) is with those who patiently persevere (2:153).
Where it lands — Both ask for effort. Islam adds that the one who walks may seek help, and that Allah (﷾) is with him.
Qur'an 21:35 — Surat al-Anbiya (The Prophets), verse 35
“Every soul shall have a taste of death: and We test you by evil and by good by way of trial. to Us must ye return.”
Cited for
Calling suffering a test does not make it less suffering. A God who tests His creatures with pain is no cure, and Buddhism at least offers an end to it.
The response
Islam does not call pain unreal. It says that hardship is met with patience and is not wasted (Bukhari 5641), and that with every difficulty there is relief (94:5-6). It also says that no soul is burdened beyond its strength (2:286). In Paradise its people say that Allah (﷾) has removed all sorrow from them (35:34). The reasons for pain, including the pain of the innocent and of animals, are taken up on the page "Why does God allow suffering?"
Where it lands — Islam grants that pain is real. It says that pain is not wasted, and that relief comes with it.
Perspectives
Buddhist teaching (the Pali texts)
A Buddhist reader will say that the title is not what the Buddha taught. Dukkha is unsatisfactoriness, and not pain at every moment. Pleasure is real, but craving for what passes is the cause of dukkha, and ending craving ends it. Everything made and passing is dukkha, so the end of it must be won by one's own work. Islam's turning to God is questioned as one more craving.
In the first sermon the Buddha says that rebirth, old age, illness and death are dukkha. In brief, he says, the five grasping aggregates are dukkha. Dukkha means unsatisfactoriness as well as pain, so the Buddha did not teach that every moment is agony.
Rebuttal
Granted, and this page says so. Dukkha is wider than pain. The Qur'an likewise calls the goods of this world a deception, and says that hearts find satisfaction in remembering Allah (﷾). It also says that life holds good as well as hardship.
The Buddha says in SN 22.60 that form is pleasurable, and that this is why beings are drawn to it. They are then caught up in it and corrupted. Pleasant feeling is real, but it is the lure that binds.
Rebuttal
The sutta grants that pleasure is real. The Qur'an calls the good things of life the gifts of Allah (﷾), and a trial of thanks. The fault lies in forgetting the Giver, and not in the gift.
Suffering arises from craving: craving for sensual pleasures, for going on existing, and for not existing. When that craving fades away and stops, suffering ends.
Rebuttal
Granted that clinging to what passes ends badly: the Qur'an warns against loving the fleeting life and leaving the Hereafter. But it does not ask a person to cut out all desire. It asks him to restrain the soul from lower desires and to aim higher.
Dhammapada 277 and 278 say that all conditions are impermanent, and that all conditions are suffering. On this view, nothing that is made and passes away can end suffering, not even a heaven.
Rebuttal
The Qur'an agrees that all on earth will perish. It then names what abides: the Face of the Lord. Of Paradise it says that no fatigue touches its people and that they will never be asked to leave.
Wanting to be with God is still craving to exist, which the first sermon names as a cause of suffering. Islam swaps one craving for another.
Rebuttal
The Buddha's path is walked with desire for its goal, as Ananda tells the brahmin Unnabha (SN 51.15). A Buddhist may call that wholesome wish, not craving. Islam draws a like line: it restrains the soul's lower desires and praises love of Allah (﷾).
Craving is easier to end away from home and family. The Pali texts call life at home cramped and dirty, and the life gone forth wide open (DN 2).
Rebuttal
The Qur'an says that God (﷾) gave His messengers wives and children. It says monasticism was not prescribed by Him (13:38; 57:27). The Prophet (ﷺ) married, and said that whoever turns from his way is not of him (Bukhari 5063). In Islam the test is met at home and among people, not by leaving them.
The Buddha says in the Dhammapada that his followers must do the work themselves, and that the Buddhas only show the way. The end of suffering is won by one's own effort.
Rebuttal
Islam also holds each soul to its own work, and burdens none beyond its strength. It adds that help is sought with patience and prayer. For Allah (﷾) is with those who patiently persevere.
The Islamic perspective
Islam does not say that all life is suffering. Life is a test with good in it and hardship in it, and this world passes. The heart is turned from what passes to the One who remains, and help is sought with patience and prayer. Belief, worship and character together are one way of life.
The Qur'an calls the life of this world play, show and rivalry in riches and children. And it says that all on earth will perish.
God (﷾) created death and life to try which of us is best in deed. He tests people by good as well as by evil.
The good things of this world are gifts of Allah (﷾). The Prophet (ﷺ) said that the believer gives thanks in ease and is patient in hardship. Both, he said, are good for him.
Hardship is real and is not wasted. No harm reaches a Muslim without Allah (﷾) wiping away some of his sins by it, and with every difficulty there is relief.
Hearts find satisfaction in remembering Allah (﷾). And the Face of the Lord will abide when all on earth has perished.
The Qur'an asks the believer to hold the soul back from lower desires. It asks him to seek help with patient perseverance and prayer.
Islam has no higher path that leaves the family behind. God (﷾) gave His messengers wives and children, and monasticism was not prescribed. The Prophet (ﷺ) married and raised a family, and he is the pattern for believers.
In Paradise no fatigue touches its people, and they will never be asked to leave.