summaryrefslogtreecommitdiffstats
path: root/net/qrtr/qrtr.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-09-02 13:08:51 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-02 11:37:02 +0100
commitd2cabd2dc8da78faf9b690ea521d03776686c9fe (patch)
treea01d22733cd9563659c2c283f9efb1509790ff58 /net/qrtr/qrtr.c
parent552799f8b3b0074d2617f53a63a088f9514a66e3 (diff)
downloadlinux-d2cabd2dc8da78faf9b690ea521d03776686c9fe.tar.gz
linux-d2cabd2dc8da78faf9b690ea521d03776686c9fe.tar.bz2
linux-d2cabd2dc8da78faf9b690ea521d03776686c9fe.zip
net: qrtr: revert check in qrtr_endpoint_post()
I tried to make this check stricter as a hardenning measure but it broke audo and wifi on these devices so revert it. Fixes: aaa8e4922c88 ("net: qrtr: make checks in qrtr_endpoint_post() stricter") Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/qrtr/qrtr.c')
-rw-r--r--net/qrtr/qrtr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index 525e3ea063b1..ec2322529727 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -493,7 +493,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
goto err;
}
- if (!size || size & 3 || len != size + hdrlen)
+ if (!size || len != ALIGN(size, 4) + hdrlen)
goto err;
if (cb->dst_port != QRTR_PORT_CTRL && cb->type != QRTR_TYPE_DATA &&