The second ground is that the water was heated by burning impure substances. They consider using impure substances disliked, and whatever results from a disliked means is likewise disliked. This is the approach taken by al-Qādī and others. On this reasoning, using the water is disliked only when it was heated with impure substances. If most of the fuel was pure, or there is doubt about the matter, this ruling does not apply.
As for smoke from impure substances, this depends on a fundamental question: when an impure, foul substance undergoes a transformation and becomes wholesome like other wholesome substances—for example, when blood, carrion, or a pig that falls into a saltworks becomes wholesome salt like any other salt, or when fuel becomes ash, kharsaf, qasramal, or the like—scholars hold two views.
The first is that it does not become pure. This is al-Shāfiʿī’s view, one of the two positions in Mālik’s school, the well-known view among Ahmad’s followers, and one of the two reports from Ahmad. The other report is that it is pure. This is the position of Abū Hanīfah, of Mālik according to one of his two positions, and of Ahmad according to one of the two reports from him.
The Zāhirīs and others also hold that such substances become pure. This is unquestionably the correct view, for these substances fall outside both the wording and the meaning of the texts establishing prohibition. They are neither prohibited nor equivalent to what is prohibited, so there is no basis for prohibiting them. Rather, they fall within the scope of the texts establishing permissibility, since they are wholesome substances. They are also equivalent to things whose permissibility is unanimously agreed upon.