Krokodil is a short-acting (a couple of hours) opiate, based on desomorphine-D. The russkis use a process starting from codeine, which is OTC there (and here in the UK), forming a mixure of chlorocodides using thionyl chloride from batteries, the intended product here is alpha-chlorocodide, although reaction of codeine with thionyl SOCl2 produces a number of other compounds, such as beta-chlorocodide (around 10-15% of the yield) and iso- and dihydrocodeines, depending on the solvent used for the reaction.
The problem is in the reduction. They use a method very similar to the one used in the US for making meth, I.e red phosphorus/iodine reduction, which forms hydriodic acid in situ, which is the active reducing species, being 'recycled' by formation of phosphorus halides, the triiodide IIRC which halogenates the hydroxyl groups of the codides, codeine and other 'stuff' in the pot, the halides formed being reduced by the HI.
Thats the most likely reaction pathway, if its similar to the reaction of (pseudo)ephedrine in a HI/RP reduction, the -OH group of (pseudo)ephedrine being halogenated by phosphorus triiodide formed in situ from the HI and red phosphorus, reduced by H, regenerating HI and red P, starting the cycle all over again.
This reduction method forms all sorts of byproducts, and the russkis apparently often do not even bother to clean the product up short of filtering it, if they even do that. Its no wonder, if they are shooting up a slurry of phosphorus, iodine, HI that it rots flesh. Jesus, you would have to be pretty stupid to expect anything else.
Been contemplating giving a similar process a shot actually, aimed at desomorphine as the end product, although I'd also bioassay the intermediate chloro-codides, as to the best of my knowledge they possess opioid agonist activity. This process can be done without forming a toxic swamp, if a clean reduction process, such as using catalytic hydrogenation with platinum or palladium on finely divided carbon.
And of course, I am neither an addict, nor living in a russian slum.