In fact, UNSC 242 says you are full of shit. It is the land-for-peace resolution introduced into the UNSC by the US on behalf of Israel after the Six Day War. It addresses the parties to the Six Day War and says Israel should withdraw to safe and secure borders which Israel subsequently did with Egypt and Jordan in return for peace, and which Israeli tried to do with Syria and Lebanon, offering to return the Golan in return for peace, but those two states refused to make peace with Israel, so there were no safe and secure borders to which Israel could return with respect to Syria and Lebanon.
UNSC does not mention the Palestinians.