Skip to content

Commit

Permalink
net: qrtr: revert check in qrtr_endpoint_post()
Browse files Browse the repository at this point in the history
I tried to make this check stricter as a hardenning measure but it broke
audo and wifi on these devices so revert it.

Fixes: aaa8e49 ("net: qrtr: make checks in qrtr_endpoint_post() stricter")
Reported-by: John Stultz <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Tested-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Sep 2, 2021
1 parent 552799f commit d2cabd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/qrtr/qrtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit d2cabd2

Please sign in to comment.