Commit d2cabd2d authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: aaa8e492 ("net: qrtr: make checks in qrtr_endpoint_post() stricter")
Reported-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Tested-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 552799f8
...@@ -493,7 +493,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len) ...@@ -493,7 +493,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
goto err; goto err;
} }
if (!size || size & 3 || len != size + hdrlen) if (!size || len != ALIGN(size, 4) + hdrlen)
goto err; goto err;
if (cb->dst_port != QRTR_PORT_CTRL && cb->type != QRTR_TYPE_DATA && if (cb->dst_port != QRTR_PORT_CTRL && cb->type != QRTR_TYPE_DATA &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment