greybus: uart: fix incomplete receive-data sanity checks
Fix incomplete receive-data sanity checks. The payload size was never verified before parsing the uart header and neither was the uart-header data size verified against the actual payload size, something which could lead to information leaks when passing data beyond the payload buffer to the tty layer. Also remove the incorrect check against the maximum (tx-buffer) payload size. Reviewed-by: NRui Miguel Silva <rui.silva@linaro.org> Signed-off-by: NJohan Hovold <johan@hovoldconsulting.com> Reviewed-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
Showing
想要评论请 注册 或 登录