IFF (EFF) is a little buggy. After installing it, my companions will fall to the ground after fast travel, needing a stimpak. But, if you give them a stimpak, they will randomly go nuts on the group and fight. I just don't give them stimpaks now, because they will recover on their own. Have you tried disabling them and enabling them? Resurrecting them (even though their not dead)? I would say try recycling them, but that might reset their quest, I'm not sure. It could be completely random bug too. You could try going back to a save before completing the BoS quest line, then complete it again to see if they bug out again.