From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58D9FC98328 for ; Sat, 26 Sep 2026 09:34:19 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35DBB40268; Sat, 26 Sep 2026 11:34:18 +0200 (CEST) Received: from mx16.kaspersky-labs.com (mx16.kaspersky-labs.com [5.79.125.27]) by mails.dpdk.org (Postfix) with ESMTP id 3FCEA402D9; Fri, 25 Sep 2026 13:26:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaspersky.com; s=mail202505; t=1790335593; bh=34GoQBM/x31ZjD0LKJXMefgheBnfPDoWVKsrLLVJgh8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MKs/auFc6lY3u2UYpZ0toVl2b/4OwrbOwLor7uHHf++RAzojjFcKEbNXU+A8gc5Sn 6L72Sn1/iQMtP3CtdDLaV5kY/12AzPsEwsv7HiMuLY/eWxjyu9Hnl9+4oGFYeObvKJ +Au85PBGRGUaGNMhEYq2NoKAEA806pF5tu0R7a37r/sb27ynG5kT0g+mcMMh+TiZ6A fr49bZVHS7ChYFTOl+CyY42tAk7gCyd3Y/ZvPgL7SskZGZ345znH2ivemT2N4ngIhW yckvda1tIzPFvu9Rq9OXSWdYpf/KlGLNxK2C6h/AYNQgjURCUs1naMAkvb37AOb0Lg +TUlxLkUvT1DA== Received: from relay16.kaspersky-labs.com (localhost [127.0.0.1]) by relay16.kaspersky-labs.com (Postfix) with ESMTP id B9F53C08A76; Fri, 25 Sep 2026 14:26:33 +0300 (MSK) Received: from mail-hq2.kaspersky.com (unknown [91.103.66.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail-hq2.kaspersky.com", Issuer "Kaspersky MailRelays CA G3" (verified OK)) by mailhub16.kaspersky-labs.com (Postfix) with ESMTPS id 881ABC0864A; Fri, 25 Sep 2026 14:26:33 +0300 (MSK) Received: from konyukhov.avp.ru (10.16.104.193) by HQMAILSRV2.avp.ru (10.64.57.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Fri, 25 Sep 2026 14:24:19 +0300 From: Alexander Konyukhov To: CC: , , , , Konyukhov Aleksandr Subject: [PATCH] crypto/ipsec_mb: fix Null ptr dereference in set_mb_job_params() Date: Fri, 25 Sep 2026 14:23:53 +0300 Message-ID: <20260925112355.3878168-1-Alexander.Konyukhov@kaspersky.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.16.104.193] X-ClientProxiedBy: HQMAILSRV2.avp.ru (10.64.57.52) To HQMAILSRV2.avp.ru (10.64.57.52) X-KSE-ServerInfo: HQMAILSRV2.avp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.1.1, Database issued on: 09/25/2026 11:10:14 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 206245 [Sep 25 2026] X-KSE-AntiSpam-Info: Version: 6.1.1.27 X-KSE-AntiSpam-Info: Envelope from: Alexander.Konyukhov@kaspersky.com X-KSE-AntiSpam-Info: LuaCore: 125 0.3.125 408a76d0ab6a6a06c054d212c38932c1e9d7db86 X-KSE-AntiSpam-Info: {diag_burst_silent} X-KSE-AntiSpam-Info: {Tracking_cluster_exceptions} X-KSE-AntiSpam-Info: {Tracking_real_kaspersky_domains} X-KSE-AntiSpam-Info: {Tracking_black_eng_exceptions} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: kaspersky.com:7.1.1,5.0.1; d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; konyukhov.avp.ru:7.1.1,5.0.1; 127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: {Tracking_white_helo} X-KSE-AntiSpam-Info: {Tracking_black_eng_exceptions_lk} X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 09/25/2026 11:11:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 9/25/2026 10:20:00 AM X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.1.8310, bases: 2026/09/25 08:25:00 #28626005 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: NotDetected X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 52 X-Mailman-Approved-At: Sat, 26 Sep 2026 11:34:16 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Konyukhov Aleksandr In function set_mb_job_params pmd_aesni_mb.c:1742 check (cipher_mode == IMB_CIPHER_NULL && oop) is not enath to garanteed job->dst != 0, which in turn could lead to NULL ptr dereference. Add new check for (sgl == 0) to be shure that job->dst was set in pmd_aesni_mb.c:1610 Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 03944ff5e3df ("crypto/ipsec_mb: support null auth/cipher for aesni_mb") Cc: roy.fan.zhang@intel.com Signed-off-by: Konyukhov Aleksandr --- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c index 05dc1a039f..57d8925a87 100644 --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c @@ -1738,7 +1738,7 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp, job->msg_len_to_cipher_in_bytes = op->sym->cipher.data.length; } - if (cipher_mode == IMB_CIPHER_NULL && oop) { + if (cipher_mode == IMB_CIPHER_NULL && oop && !sgl) { memcpy(job->dst + job->cipher_start_src_offset_in_bytes, job->src + job->cipher_start_src_offset_in_bytes, job->msg_len_to_cipher_in_bytes); -- 2.55.0.windows.2