Just do a quick search on Google about medieval helmets and chainmails and found this picture (I was thinking it was just a bad clipping but in fact it doesn’t all the time)
the chainmail is directly attached to some helmets, at the beginning I thouth it was some kind of chaimail hood placed under the helmet.