Does it look like this?
If so, it is an oral ppilloma. They are viral lesions similar to human warts.
We usually do not remove them unless they are bothering the dog. That is because they often just grow back.
It may also be an abscess, hence the smell.
If so, he will be scripted an antibiotic.
Please let me know how he is doing.
Best wishes for him,
In that case it sounds like an abscess caused by a bad tooth or root in the gum.
The bad smell indicates there is an infection present.
Your vet will give him an antibiotic and take an x ray.
He will probably need the tooth extracted.