]> git.baikalelectronics.ru Git - kernel.git/commit
net: qrtr: Fix an out of bounds read qrtr_endpoint_post()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 30 Jun 2020 11:46:15 +0000 (14:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Jul 2020 01:36:13 +0000 (18:36 -0700)
commitdd0513dd95f2e3d50b8ed72d41b245c79b5c124a
tree455655ae7ad1e53174166f45a484c2b3812786e8
parent4964d28a521c9ca293abfc104fdd279d404e9604
net: qrtr: Fix an out of bounds read qrtr_endpoint_post()

This code assumes that the user passed in enough data for a
qrtr_hdr_v1 or qrtr_hdr_v2 struct, but it's not necessarily true.  If
the buffer is too small then it will read beyond the end.

Reported-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reported-by: syzbot+b8fe393f999a291a9ea6@syzkaller.appspotmail.com
Fixes: e9757df91305 ("net: qrtr: Support decoding incoming v2 packets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/qrtr.c