The smell is unmistakable and it gets worse before it gets better. Here is what actually happens on a dead animal call, and roughly how long the odour lasts once the source is out.
Locating it without demolishing the wall
Smell intensity is mapped across the wall and ceiling surfaces, which usually brackets the location to a few feet.
Fly activity narrows it further. Emerging flies head for light, so a cluster at one window with no food source nearby is a reliable pointer.
Staining, when it appears, is definitive. So is a warm spot on some surfaces. Access is then cut as small as practical, usually a single neat opening.
Why the smell gets worse first
Decomposition accelerates with heat, so an attic carcass in summer peaks fast. Air handlers make it worse by pulling odour through ducting and distributing it through the house.
Turning the system off or closing the affected return can reduce how far it travels while you wait.
How long it lasts
Once the source is removed and the area treated, most of the odour clears within a few days. Residual smell in porous material such as insulation or drywall can linger longer, which is why contaminated material gets removed rather than sprayed.
If nothing is done, expect weeks, and considerably longer in a cool cavity where decomposition is slow.
What treatment involves
Removing the carcass and any contaminated material. Treating the source area with an enzymatic product that breaks down residue rather than masking it. Fly and larvae treatment. Disinfection. Clean repair of the access opening.
Then sealing whatever entry point let the animal in, because otherwise this recurs.
When it is under the house or in a duct
Crawl space carcasses are usually straightforward to reach. Ductwork is not, and contaminated duct sections sometimes need replacing rather than cleaning, because the odour will keep circulating otherwise.