rpmsg: validate incoming message length before propagating
rpmsg: validate incoming message length before propagating

When an inbound message arrives, validate its reported length before
propagating it, otherwise buggy (or malicious) remote processors might
trick us into accessing memory which we really shouldn't.

Signed-off-by: Ohad Ben-Cohen <f42ebdd520afb7505b40286b1d13fbb7281e5b96@wizery.com>
Cc: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@secretlab.ca>
Cc: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>
Cc: Mark Grosen <626d0b6e003883ecfc89eb4c9c2ab324c1ff308c@ti.com>
Cc: Suman Anna <68636d6b0a4dfe1213ee9d7712e75a8cc339119f@ti.com>
Cc: Fernando Guzman Lugo <ce564f1db7746e165d007472e93c96c0f8f027cd@ti.com>
Cc: Rob Clark <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@ti.com>
Cc: Ludovic BARRE <7d00b576244a20da2a0f3436a00218e40cced604@stericsson.com>
Cc: Loic PALLARDY <c5fc3630e84ba083589c715116a290542c97f5bb@stericsson.com>
Cc: Omar Ramirez Luna <75108f4fedbbf960e2d357a652cba42b6b93f179@linaro.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs