so zen and theravada masters have to be reborn until they attain rainbow body in order to be liberated from samsara forever? In that case an Arahat will have to be reborn again? This is a big contradiction between early buddhism and tibetan buddhism.
Well, according to Tibetan Buddhism an Arhat is liberated from samsara but this is not the full liberation of Buddhahood. Their defilements are eliminated but they still have some obscurations regarding wisdom.
When an Arhat dies, they are reborn in a formless realm where they are in constant meditation. After a long, long time (cosmic time here) they are roused from their samadhi by a Buddha and are reborn as high Bodhisattvas (6-8th bhumi - I'll look the details up on this).
To my knowledge, Tibetan Buddhist teachers don't say what happens to Zen masters upon death (of course they don't address Chinese Mahayana masters either but I know that many Mahayana [and Theravadin] masters are viewed in high regard).
Personally I have added the name of my former Zen teacher to the list of enlightened masters whom I pray for, for their swift rebirth to free all beings.
_________________Kirt's Tibetan Translation Notes
"Only you can make your mind beautiful."
HH Chetsang Rinpoche