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, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is impermissible to buy such a warranty because it involves uncertainty. Abu Hurayrah said, “The Prophet, sallallaahu ‘alayhi wa sallam, forbade trade which involves Gharar (uncertainty and deception out of ignorance about the sold item).” [Muslim]
Gharar is every transaction that involves uncertain ends. Such Gharar is fulfilled in this transaction because the computer parts in question may or may not be broken. Moreover, in case of damage perhaps their price and the price of fixing them may be far lower than the amount of money paid in return for the warranty.
It is well-known that sometimes the value of these parts may many times equal the amount of money paid while other times it does not.
It is also well-known that such parts are affected by the use of people. Some people use their computers for long periods of time while others do not. Hence, the value each person gets in return for the warranty that he bought will vary. In light of these considerations, which indicate the occurrence of harm to either the buyer or to the seller, we see that this transaction is impermissible.
Allaah Knows best.