Message ID | 20241018181842.1368394-2-denkenz@gmail.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | QRTR Multi-endpoint support | expand |
diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c index 3de9350cbf30..6158e08c0252 100644 --- a/net/qrtr/ns.c +++ b/net/qrtr/ns.c @@ -619,6 +619,9 @@ static void qrtr_ns_worker(struct work_struct *work) break; } + if ((size_t)msglen < sizeof(pkt)) + break; + pkt = recv_buf; cmd = le32_to_cpu(pkt->cmd); if (cmd < ARRAY_SIZE(qrtr_ctrl_pkt_strings) &&