Sure, if they are used 100% correctly they are. Masks in this context aren't even near that number anyway. People aren't wearing masks properly most of the time.
Back during the AIDS epidemic some group did an experiment on condoms. I believe they took like 100 married couples who were otherwise not using condoms as a means of birth control, and not to test for birth control, but to see what happened with the condoms themselves; they asked the couples to record their experiences. Now these were married couples in the privacy and comfort of their own homes; people already familiar with each other sexually--- no pressure, no worries--- just what happened with condoms.
I recall something like 18-20% failure/mishaps with the condoms. Slipping off, tearing, etc. So not really a 100% certain that had they been using them as a protection against AIDS, that it wouldn't result in the possibility of infection is what they concluded.
The article then went on to predict that younger people, people maybe drunk of on drugs, or just the type of sexual encounter that might happen say in a car, a restroom-- or something like that, and the "mishap rate" might be even higher.