From: David Ahern Date: Thu, 16 Feb 2017 16:58:58 +0000 (-0800) Subject: ip vrf: Detect invalid vrf name in pids command X-Git-Tag: v4.10.0~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5377431df6de037b668eba418dca28f1113d303;p=thirdparty%2Fiproute2.git ip vrf: Detect invalid vrf name in pids command Verify VRF name is valid before attempting to read cgroups files. Signed-off-by: David Ahern --- diff --git a/ip/ipvrf.c b/ip/ipvrf.c index cb7f9fa6d..5e204a9eb 100644 --- a/ip/ipvrf.c +++ b/ip/ipvrf.c @@ -212,6 +212,10 @@ static int ipvrf_pids(int argc, char **argv) } vrf = argv[0]; + if (!name_is_vrf(vrf)) { + fprintf(stderr, "Invalid VRF name\n"); + return -1; + } mnt = find_cgroup2_mount(); if (!mnt)