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 1CFFE45BB6 for ; Wed, 23 Oct 2024 23:21:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1744940261; Wed, 23 Oct 2024 23:21:53 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id CD8D540261 for ; Wed, 23 Oct 2024 23:21:51 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4315abed18aso2068325e9.2 for ; Wed, 23 Oct 2024 14:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718511; x=1730323311; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ImEAkQTFm71iBb/Cygv1W2UbqPVGxXHbVxkVXyt9Rx4=; b=MbvZYTF8ESrOiOnfPsA/ZVv5BmfQUlIdSUXv6yYsoD+9f8vU7BnlLJykyEqYT5NGm/ EXnkjCXOz581o9qp5uPnGr6UBczqGaxZbEf5CxHZQpT8yTucNU/3MVJ1Fci7EYEePHuI ffcn0YMpGExYkM5iSwmvrjnRtvPu9vEi68LQc5kLqe7UOTYP+K3x2/I//Cvc01SfcKZE 77QOi4BtSJiqoV3cJSaAYuUFy+cxr88cudjjlzz9Mr9AOPJGYlTuKJBQ2zaC60N4rfLX bgr91ceoaRQaB1gi5FQRUag5cUGtyB2yyCJZ86aHe22Uh/3wQHkd8QxF3QdadT+OLZyH ohKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718511; x=1730323311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ImEAkQTFm71iBb/Cygv1W2UbqPVGxXHbVxkVXyt9Rx4=; b=AglBa3nONDkdRLSEQT5PeYf+IikFAjnuQkvjRyolfZ2fv/OTj+tKVcZ0Cpm8u/OrDp d9K2SD+zHVSMkTbZyKmnaOi0tq+nf1Cv9kfXjstXQrZSA/bxiFNq7qiq/4xrspyFFU50 A6HxtYe1HBZwTag2LrN9fE59qyLZHi/5FwusgmbJC/i83LplM1CFSP3ZFxcMSlts7S9J M+T/0kfiyAWmD8o6dppqzBs7XSu1SFXAlwyLtpbt22JJfExStcCOezxp31zGMtaEhg1p SEE1IGaD9VleqWYvki/RmtxVetNu/ed1Hqix9m5iQAs0ZyOkcD5snC3SyUT+lVsj0jyH cBcw== X-Gm-Message-State: AOJu0YzEFkh5KuiklBli4miSAVXrxuHWo5LAgB0JGhcYVQH1/bCpDIx3 nnP5muvAtr0olMmf3d/BQ1o9UAKhyRWgFwy3l5c0aOgAGMtInOSezTvoEqFH X-Google-Smtp-Source: AGHT+IHa/6On7STeTEGgQ+3HJF6FxDffXcGgHT9FFhqPtc+aRaCw0DoIQMxwo2YgcYmGvZ7yHLJ0IA== X-Received: by 2002:a05:600c:1c0f:b0:431:3b53:105e with SMTP id 5b1f17b1804b1-431841fda82mr33044775e9.9.1729718511168; Wed, 23 Oct 2024 14:21:51 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c508ddsm27046255e9.40.2024.10.23.14.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:21:50 -0700 (PDT) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: dpdk stable Subject: patch 'dmadev: fix potential null pointer access' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:56 +0100 Message-ID: <20241023211704.1216956-76-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/45655bbf5920f832cc6dd7e6af49ecc64bf99afd Thanks. Luca Boccassi --- >From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Sat, 12 Oct 2024 17:17:34 +0800 Subject: [PATCH] dmadev: fix potential null pointer access [ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer access is triggered. This patch adds the null pointer checker. Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use") Signed-off-by: Chengwen Feng --- lib/dmadev/rte_dmadev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index d94f85ea9a..2091db98bd 100644 --- a/lib/dmadev/rte_dmadev.c +++ b/lib/dmadev/rte_dmadev.c @@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * { struct rte_dma_dev *dev = &rte_dma_devices[dev_id]; - if (!rte_dma_is_valid(dev_id)) + if (!rte_dma_is_valid(dev_id) || status == NULL) return -EINVAL; if (vchan >= dev->data->dev_conf.nb_vchans) { -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:43.409268515 +0100 +++ 0076-dmadev-fix-potential-null-pointer-access.patch 2024-10-23 22:16:40.555944919 +0100 @@ -1 +1 @@ -From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001 +From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 845727210f..60c3d8ebf6 100644 +index d94f85ea9a..2091db98bd 100644 @@ -22 +23 @@ -@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * +@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *