There is a canal between the ears and throat. However, since the eardrum blocks that canal, water or medicine does not reach the throat. Therefore, the medicine dropped into the ear and having the ears washed do not invalidate fasting.

Even if there is a small hole in the eardrum, the medicine will not reach the stomach or very little of it will reach the stomach. As we have mentioned before, such a small amount is regarded exempt. However, if the eardrum membrane is pierced, water may reach the stomach during when one has his ears washed. Therefore, an amount of water that is enough to validate fasting reaches the stomach, fasting will be invalidated.