From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 813754705A for ; Tue, 16 Dec 2025 17:12:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77E47402D0; Tue, 16 Dec 2025 17:12:43 +0100 (CET) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by mails.dpdk.org (Postfix) with ESMTP id 2A78C4026D for ; Tue, 16 Dec 2025 17:12:33 +0100 (CET) Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-8b2ea2b9631so494598685a.3 for ; Tue, 16 Dec 2025 08:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytheb-org.20230601.gappssmtp.com; s=20230601; t=1765901552; x=1766506352; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xpcLx9AAq6ftZ+0cqpYlfc3s0pkHBkXlLslICWRshoI=; b=Fmgwo2WN+m6R1naoJctYrb62cxGem6vkGUfwVqD1H1bFO6I5rwUo6ceMNco+LI61Km Bmro1FzxGhxZmnTkqvbau2jnNliP+6E1zoGhQC41OtEOBCuHCmr15eS7CF6HXilUJ+Dl 4uXTle5HQEU1/1q6xU8IvcwI/dAC+9w7KEaoq78EoiOl+knbjMnfFP8mGPNepi7QVxC+ 08UKtI30UI6Js9V7Obz48fjObTFpnctM9D/wuUPg8mUBMkoMwoE1vgMiQzS6l85A6aSv oPd/YohLk+Qko2gu9kfUTk8ULSGuzOfm5xJjvmxS9MK24dxwPVwhVZg7hRuUZF2vTnr7 /dCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765901552; x=1766506352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xpcLx9AAq6ftZ+0cqpYlfc3s0pkHBkXlLslICWRshoI=; b=qp47A9VzzghucuFIRbvlV0fL23LoX6GvUIC6rEdWyu8B3qtJYPI84NqoXKGJD+5NFE EqJyNGQAXPQRmSJY7iwF2d+jX9ANZbHaEY+jTdBDzS87YV8LjALsqSegsWb9ZD4gKvxF FELe3LDTJlshx+AcRx+TQ7/n5MFb888upOP1lZyB9pzix59z5AKyQaZ9LSwUtJNpjjbp 1qia++cpSCaw4cveoqFtOpOlL2XEcAy2n1OR02XQ9xgaTDZH5aUq2skyRr0Aq3f9Oipu Q3VoTKRCVhDHKZsaTqtPIVQU4DdtActyMN1T3AYAHb4AaW7xcOtVozGDj86zGV+UsRL2 oNhw== X-Gm-Message-State: AOJu0YzGG1Uc3nFVJOjHWUKWX7qTMn5TBr8Gq1OQwWiIQcqd6cG5+HpC eFlbreMnbX8KAoDx00wwljyJybJldG4CajASyeypJjlk4/N1H1hoyM7D++HPi3gWT4KnfQN8+35 KhdwO X-Gm-Gg: AY/fxX7Q96DK0g7JJPTaQufoi2ZPaU9Wr/L4yN6kYlvyj6wQBjT9T0ekP1vBPx5cveM p8T+KjqNQoHdqq+yu95AVvkLzzpurVKpbJD+fxCv1/mcXqAYGbjoGnIQ7dzSj+p7PKGC9KXwfkY o3F7iMQf9j/PZiizT220R5lewn/gjr3X1iMJwd+srGnv5E1AhY/vN7d005IM5EIHPvy5nZSFpOk +yJxaidEn8qXmPI6djULjIxC2pvg6/A9HB4e/bg16U/eHBlel7mynqeSJ4O5MHExpLd+e/VmQMO TXXypJrItpg4+P36YITrmpb/NaHVqMv7n1rfrFO/pmSGyPk3Crfn+Rr+xaa1+1GBNDjlcqFiNhR 46z88LGvG/v1O8e5sf3mMZcPw7P8+HnEtOJKKdsRIZOkiXCyAyNZvBsdBdqLgZ6brzU/VCLXnRK BSyEzR5DJshNdF4WrUiA== X-Google-Smtp-Source: AGHT+IHO83A0QBEgub0Box73ow8dkuzj/Wh4yjpioFiX0fA1H1AydKR1LKp+CuEpkmoLhydRe53kgg== X-Received: by 2002:a05:620a:1a26:b0:8ba:5255:107 with SMTP id af79cd13be357-8bb397db52bmr2199740385a.18.1765901550520; Tue, 16 Dec 2025 08:12:30 -0800 (PST) Received: from RHTRH0061144.redhat.com ([47.14.5.10]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8be31b676besm215848485a.45.2025.12.16.08.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 08:12:29 -0800 (PST) From: 0-day Robot To: test-report@dpdk.org, Stephen Hemminger Subject: |SUCCESS| pw159225 [PATCH v5 14/17] eal: handle long shared library path Date: Tue, 16 Dec 2025 11:12:28 -0500 Message-ID: <20251216161228.762625-1-robot@bytheb.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251207191242.165619-15-stephen@networkplumber.org> References: <20251205022948.327743-1-stephen@networkplumber.org> <20251207191242.165619-1-stephen@networkplumber.org> <20251207191242.165619-15-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: 0day Robot - Claude SONNET Test-Status: SUCCESS http://dpdk.org/patch/159225 _AI Review Comments Available_ git sha: [commit hash not provided in patch] Author: Stephen Hemminger Subject: eal: handle long shared library path This commit replaces a fixed-size buffer for shared library paths with dynamic allocation using asprintf() to prevent potential buffer truncation when concatenating paths. > diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c > index b1fb670ea0..6aa078e135 100644 > --- a/lib/eal/common/eal_common_options.c > +++ b/lib/eal/common/eal_common_options.c > @@ -570,7 +570,6 @@ static int > eal_plugindir_init(const char *path) > { > struct dirent *dent = NULL; > - char sopath[PATH_MAX]; > DIR *d = NULL; > > if (path == NULL || *path == '\0') > @@ -584,19 +583,29 @@ eal_plugindir_init(const char *path) > } > > while ((dent = readdir(d)) != NULL) { > + char *sopath = NULL; > struct stat sb; > > if (!ends_with(dent->d_name, ".so") && !ends_with(dent->d_name, ".so."ABI_VERSION)) > continue; > > - snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name); > + if (asprintf(&sopath, "%s/%s", path, dent->d_name) < 0) { > + EAL_LOG(ERR, "failed to create full path %s/%s", > + path, dent->d_name); > + continue; > + } Can this code handle the case where asprintf sets sopath to an undefined value on allocation failure? The POSIX specification allows sopath to be undefined after a failed asprintf call, but the code later calls free(sopath) which could be problematic. > > /* if a regular file, add to list to load */ > - if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode))) > + if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode))) { > + free(sopath); > continue; > + } > > - if (eal_plugin_add(sopath) == -1) > + if (eal_plugin_add(sopath) == -1) { > + free(sopath); > break; > + } > + free(sopath); > } [ ... ] > > closedir(d);