Salmonella from mayonnaise is possible but it's also very unlikely.
To be able to get salmonella the eggs have to be infected with the bacteria that causes salmonella which the chicken gets infected with.
Salmonella is a very real thing but with eggs that you cook the salmonella is killed off and most mayonnaise today uses heat treated eggs and sometimes fully cooked eggs to make the mayonnaise.
If you eat old mayonnaise then you could likely get a stomach ache or food poisoning but Salmonella is very unlikely but still possible.
Mayonnaise will last between 2 to 3 months when you keep the opened jar of mayonnaise closed and in the refrigerator.
If the mayonnaise hasn't been opened then the jar of mayonnaise should last up to 6 months before going bad.
When the mayonnaise goes bad it will usually have a rotten egg odor or an acidic, or putrid smell to it.
Bad mayonnaise will also likely have some mold growth, mold spores etc as well as an off taste and a change of color, like darker shade of white or brownish yellow.
If the mayonnaise smells bad or tastes bad then you should throw it out because it could give you a stomach ache or possible food poisoning.
Although food poisoning is not very serious in most cases it can be deadly so if in doubt just throw the old mayonnaise out.