diff options
author | Xiaolong Huang <butterflyhuangxx@gmail.com> | 2021-08-19 21:50:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-20 15:41:03 +0200 |
commit | 7e78c597c3ebfd0cb329aa09a838734147e4f117 (patch) | |
tree | 29160f8a3394ec0b5032638368b1e005b18da42e /arch/ia64/kernel/pci-dma.c | |
parent | ice: do not abort devlink info if board identifier can't be found (diff) | |
download | linux-7e78c597c3ebfd0cb329aa09a838734147e4f117.tar.xz linux-7e78c597c3ebfd0cb329aa09a838734147e4f117.zip |
net: qrtr: fix another OOB Read in qrtr_endpoint_post
This check was incomplete, did not consider size is 0:
if (len != ALIGN(size, 4) + hdrlen)
goto err;
if size from qrtr_hdr is 0, the result of ALIGN(size, 4)
will be 0, In case of len == hdrlen and size == 0
in header this check won't fail and
if (cb->type == QRTR_TYPE_NEW_SERVER) {
/* Remote node endpoint can bridge other distant nodes */
const struct qrtr_ctrl_pkt *pkt = data + hdrlen;
qrtr_node_assign(node, le32_to_cpu(pkt->server.node));
}
will also read out of bound from data, which is hdrlen allocated block.
Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets")
Fixes: ad9d24c9429e ("net: qrtr: fix OOB Read in qrtr_endpoint_post")
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/ia64/kernel/pci-dma.c')
0 files changed, 0 insertions, 0 deletions