From patchwork Mon Nov 2 14:15:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5552 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:3119:b0:118:2077:975e with SMTP id e25csp5467415laa; Mon, 2 Nov 2026 06:16:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AKwUvBzohw7IPrK8QEPwfkZYF0qW+x7lMy6FmveyaPcCEYRBwEDzj06A/ZyL4JO7b3L+3aG96Yu+pLSejAQ=@openvpn.net X-Received: by 2002:a05:693c:87c6:10b0:367:5e31:ce29 with SMTP id 5a478bee46e88-36a42404ab3mr16538320eec.20.1793628967981; Mon, 02 Nov 2026 06:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793628967; cv=none; d=google.com; s=arc-20260327; b=qU1t6KsmnsB2GyVh0mzk8+EQnoxIXihY1BBqi3wKX4zeEbNmbe+k6MOHQVrYp9GjPV kpGN8oKRHKE0tKolD8TG6ac3bFQCvQjDv/sI2N40+28wHQhlJZubsKmNRe30bgGSFB+V JxPPZB9slTqgmZ4Flo2bjqViuEAKwA9vzHrjd6TXrVF+/uLa1Gk+OxpNGXVavh5t2ecu 6rANxlGHygiuwgd1TcoGdSLgvq76thuBgVRxP77SfDPDAfPmCjyBSDm8mgqV3dEp7ASK f76OSTs1WcHpn3/PPTptQGSHcQCueOxj3M2hO0hprxTHtOmPTwrGDWsGUPFboYYYWwRI sthQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=Kg6ka3k3/Omx/YtUtiE1nGtVZzlgKXNbpjZrO0owAGY=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=m6MIc/XRrRUtatZOoi2AEbFVkePxkUtF2Af5zJvderxa9oOPlfzej17jC79i4f9qVl JumOncFponfe4g6Cpu5kJMynoRlpyU0Sld0akOjdfs2EC++m51P0t+i6MlPkLqv12EMW SJUDOPfgygQbLgatUfESqgTIMtCHcS3yrV0slJOzImSdbvna0g1FmGCG3XCtfighLoHX R9KpmiYW3GxAccnNfzxvOTSkDIVNgCu25g5HV1DR0Sd/pAViZC1bVQ+rSZ0wO8iEuqcs locGHsExyEA+mo1Mp5qjIB19cBbxbH3q+hMtdNKBGcTjHYgc0y/cxjy2o51efBpkj+Zg 5k9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Xpn0m2rg; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=eFY8pM4H; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=YUwMx8Ul; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5a478bee46e88-36a42a9089dsi30635676eec.29.2026.11.02.06.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2026 06:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Xpn0m2rg; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=eFY8pM4H; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=YUwMx8Ul; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=Kg6ka3k3/Omx/YtUtiE1nGtVZzlgKXNbpjZrO0owAGY=; b=Xpn0m2rgioubZJ UMTtx4Y+j0WAYhozgg7FqZPEJcNa498QXt4MDwjgrBknMfp7TwfX215Em+AokXAEI1KFkdognSWcU hlzg6mq5SsPnxcYP3xKSXzJZK2b0MIAjiPh70tKOgiuAQVejhYoLeFH7jHLjOed/Ld6VNd5n0LPDt bug=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xNspS-000000005Vz-3L6c; Mon, 02 Nov 2026 14:16:06 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xNspR-000000005Vm-1buC for openvpn-devel@lists.sourceforge.net; Mon, 02 Nov 2026 14:16:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lT8mOmb+keS5Dx4HJVFFz0jI4t7sqqY4tZIWgQEcNVE=; b=eFY8pM4Hna+uB1T/FZ8tcRiJlX 0APcKJTpl017HXIoogzDZcLoc2IdAfkB0qLkLGVyDAeI+3BcQhQO3wI+PMZCwIZCyR7Bw9llkKH1I W0zC1ZuiSz3lNWsc3bbgRl6Eu65ewv/bAxb7PifJDwRd351BLxJBtf7KyqLyg7eDrHE4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lT8mOmb+keS5Dx4HJVFFz0jI4t7sqqY4tZIWgQEcNVE=; b=YUwMx8UlgjojoZ+3q0233AfK0v CTDdcrOjUdx/dAf2okCmqo8pJ5BIlWh5RUFq59et6fu/Qlc7tR7JFVReM6zLZfmnJLL9EQqCwT5T3 72VDTRFnJ09oXdY9/vxb8gp8mZzM/z4uXwJn1jTAJxYtqeY19fmrZVBL8KddvlH/+z3s=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xNspP-000000001Ir-11b9 for openvpn-devel@lists.sourceforge.net; Mon, 02 Nov 2026 14:16:04 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6A2EFuOG029922 for ; Mon, 2 Nov 2026 15:15:56 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6A2EFuVQ029921 for openvpn-devel@lists.sourceforge.net; Mon, 2 Nov 2026 15:15:56 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 2 Nov 2026 15:15:51 +0100 Message-ID: <20261102141556.29908-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Razvan Cojocaru opt was dereferenced before ASSERT(opt). Move the assertion up. Change-Id: Id6587b3d44d3326cae83c460cd85e8570ee8666a Signed-off-by: Razvan Cojocaru Acked-by: Steffan Karger Gerrit URL: https://gerrit.openvpn.net/c/openvpn/ [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xNspP-000000001Ir-11b9 Subject: [Openvpn-devel] [PATCH v1] crypto: assert opt before first use in openvpn_decrypt_aead() X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1880756288891907604 X-GMAIL-MSGID: 1880756288891907604 From: Razvan Cojocaru opt was dereferenced before ASSERT(opt). Move the assertion up. Change-Id: Id6587b3d44d3326cae83c460cd85e8570ee8666a Signed-off-by: Razvan Cojocaru Acked-by: Steffan Karger Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2089 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2089 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Steffan Karger diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index 3d3ab0c..498c327 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -440,6 +440,7 @@ struct gc_arena gc; gc_init(&gc); + ASSERT(opt); struct key_ctx *ctx = &opt->key_ctx_bi.decrypt; const bool use_epoch_data_format = opt->flags & CO_EPOCH_DATA_KEY_FORMAT; if (!use_epoch_data_format && cipher_decrypt_verify_fail_exceeded(ctx)) @@ -450,7 +451,6 @@ const int tag_size = OPENVPN_AEAD_TAG_LENGTH; - ASSERT(opt); ASSERT(frame); ASSERT(buf->len > 0); ASSERT(ctx->cipher);