]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: qrtr: ns: Limit the total number of nodes
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Thu, 9 Apr 2026 17:34:15 +0000 (23:04 +0530)
committerJakub Kicinski <kuba@kernel.org>
Mon, 13 Apr 2026 22:34:06 +0000 (15:34 -0700)
commit27d5e84e810b0849d08b9aec68e48570461ce313
tree6e5f03874c8abd44ca4da5f6e662e32d605d2cf6
parent68efba36446a7774ea5b971257ade049272a07ac
net: qrtr: ns: Limit the total number of nodes

Currently, the nameserver doesn't limit the number of nodes it handles.
This can be an attack vector if a malicious client starts registering
random nodes, leading to memory exhaustion.

Hence, limit the maximum number of nodes to 64. Note that, limit of 64 is
chosen based on the current platform requirements. If requirement changes
in the future, this limit can be increased.

Cc: stable@vger.kernel.org
Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260409-qrtr-fix-v3-4-00a8a5ff2b51@oss.qualcomm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/qrtr/ns.c