Many people are sensitive to certain smells, but in an olfactory hallucination (phantosmia), you detect smells that aren't really present in your environment.
The odors detected in phantosmia vary from person to person and may be foul or pleasant. They can occur in one or both nostrils and usually can't be masked by food.
Phantosmia most often occurs as a result of a head injury or upper respiratory infection. It can also be caused by temporal lobe seizures, sinusitis, brain tumors, migraine, Parkinson's disease and stroke.
Because phantosmia can in rare cases be an indication of a serious underlying disorder, consult your doctor if you experience such symptoms.
Note that phantosmia is different from another disorder of sense of smell, known as parosmia, in which a smell is present in your environment but is distorted. Parosmia can occur with damage to the olfactory system, such as after a severe respiratory infection. In this situation, there's usually also a loss of sense of smell.