'Rancid' describes something with an unpleasant smell or taste, typically fats or oils that have gone bad. 'Putrid,' 'stale,' and 'fetid' all describe foul or unpleasant odors from decomposition. 'Sordid' means morally foul or dirty (like sordid details/crimes), which is about moral corruption rather than smell.