From patchwork Tue Dec 14 05:59:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 2178 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id QJjVKejNuGHOWAAAqwncew (envelope-from ) for ; Tue, 14 Dec 2021 12:01:28 -0500 Received: from proxy4.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id WKWJD+nNuGGoVAAAfY0hYg (envelope-from ) for ; Tue, 14 Dec 2021 12:01:29 -0500 Received: from smtp26.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy4.mail.ord1d.rsapps.net with LMTPS id kDW6DOnNuGG9fQAAiYrejw (envelope-from ) for ; Tue, 14 Dec 2021 12:01:29 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp26.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 79e24b7c-5cff-11ec-82fb-525400c5b129-1-1 Received: from [216.105.38.7] ([216.105.38.7:34872] helo=lists.sourceforge.net) by smtp26.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A2/A3-10556-7EDC8B16; Tue, 14 Dec 2021 12:01:27 -0500 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mxBA2-00027J-UH; Tue, 14 Dec 2021 17:00:18 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mxB9y-00027C-RQ for openvpn-devel@lists.sourceforge.net; Tue, 14 Dec 2021 17:00:16 +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:Cc:To:From:Sender:Reply-To: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-Subscribe:List-Post:List-Owner:List-Archive; bh=8BSpabQbP+2OshUFC9FLG+VjMYDx+BKlbkAxp4BW0gU=; b=XL5x4ugYrGsnt6xbpc3lkC6Jwo O+V+UV1zUV/lyQY72hf/789LlD4NnEPtK1cMf2LhlXOycDjodNOxQWpXI+Qt90i8+MjbvQ77YiB13 ixPPQLDOs0VERThYU97zhr6s270C0dYbRnyGKG8ESBg9P/gx20cTfzyuv0P9yb5p1fIY=; 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:Cc:To:From:Sender:Reply-To: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-Subscribe: List-Post:List-Owner:List-Archive; bh=8BSpabQbP+2OshUFC9FLG+VjMYDx+BKlbkAxp4BW0gU=; b=iOQOcviM1GpyWlNMoUXzZEL/sY tWj1+dRfGLwUMDBIm66/JkrFmWRUsQ/KlZc4yaTV3Fu7QZ9iWRIGvaDiz1+nofRM7yFStMtCOQdD3 IDzy222l/wimZgf5YVHYz+HPDAGJsNbeqZQZSNXGbQrx0XLRQxd9sN/grW1UxnsImm4Y=; Received: from mail-il1-f172.google.com ([209.85.166.172]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1mxB9r-0000bf-UO for openvpn-devel@lists.sourceforge.net; Tue, 14 Dec 2021 17:00:14 +0000 Received: by mail-il1-f172.google.com with SMTP id t1so5092583ils.11 for ; Tue, 14 Dec 2021 09:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8BSpabQbP+2OshUFC9FLG+VjMYDx+BKlbkAxp4BW0gU=; b=Pagq5IyblbJ+Q22znwT7Ft9zc8uE2VkJctcIGeQ3qZV24l7BX/RFziHfKeCPBJTDM6 nWA4NEu+tvTFYVlumXTc+o7xm5D/3h2qsS3vKELnbWu6Lxm5L1NVCBaA8db/C+SNUrlr fNzrzeLEZk5SIUjN7QyTDs9bKch3XnmZPs4PDpxeqYr32iVvxhaezjRMgF7Ma20puEYR BfHhZK3S4jyJVquCTXibIWpRuOyO+vDKkzjABuboYGo2Yr5YtVSRtTXPmhrOeA3wQogy Nu0yj+kPpx/ng8whJ7d2VmfzocP8+hh1mrdsKt3XNNC9wkbqKymwLfWJ2C1gBFA0EC8P FQRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8BSpabQbP+2OshUFC9FLG+VjMYDx+BKlbkAxp4BW0gU=; b=59IpUuQDkZaYhir/fHtHP0GPFYz10+NalMrVnTLUH//gC7IG4cguLHFidzm5gAR9i6 stWfJ9RfI8fVDwV5st6YsYxLNydYKIvxv7BdG5pxacfZSMFjSVUY3ECMFz23wmDlY8sx 8OtBfbZvmEzSLYKRHrUxWARwC9eooWrfR8pq4oHnNZ0aLF9xUbBIS/couW2cIRHzxntt i/cjKulrsjXlBhs4AoBy3SSyvYJHOyABHKILjsjtQJc7HltGC+ZvCLhjn1V0ZeV8LrA9 AKlc/8phFZppAUwHfA4R7werSb0aIRY6hAcO4H6wxsDt6YZeqqtSwklDncLxY5d4up+G sLRA== X-Gm-Message-State: AOAM5306mT002lRmB2wpDsu6oUyz4dtLM5krslnABSEGffNjymifYdio 9ZDde6YES6jvPUHcA3qnUQ6LEityFx4= X-Google-Smtp-Source: ABdhPJw+ByJBk7C7QVmnuKCf0iH5Bols4YD+LXrWIhEyfjXmbMcs/B1bauh5bf7k9taZZdPEzs+lPg== X-Received: by 2002:a05:6e02:1033:: with SMTP id o19mr4334839ilj.267.1639501201648; Tue, 14 Dec 2021 09:00:01 -0800 (PST) Received: from uranus.home.sansel.ca (bras-vprn-tnhlon4053w-lp130-02-70-51-223-8.dsl.bell.ca. [70.51.223.8]) by smtp.gmail.com with ESMTPSA id e9sm178778ilm.44.2021.12.14.09.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 09:00:01 -0800 (PST) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Tue, 14 Dec 2021 11:59:22 -0500 Message-Id: <20211214165928.30676-13-selva.nair@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211214165928.30676-1-selva.nair@gmail.com> References: <20211214165928.30676-1-selva.nair@gmail.com> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: Selva Nair Sending largish messages to the management interface errors due to the limited size used for the "error" buffer in x_msg_va(). Although all intermediate steps allocate required space for the data to s [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.172 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.172 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [selva.nair[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1mxB9r-0000bf-UO Subject: [Openvpn-devel] [PATCH v3 12/18] Increase ERR_BUF_SIZE when management interface support is enabled 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 From: Selva Nair Sending largish messages to the management interface errors due to the limited size used for the "error" buffer in x_msg_va(). Although all intermediate steps allocate required space for the data to send, it gets truncated at the last step. This really requires a smarter fix. As a quick relief, we just increase the buffer size to 10240 when management support is compiled in. Should be enough for PK_SIGN with undigested message. Signed-off-by: Selva Nair Acked-By: Arne Schwabe --- src/openvpn/error.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.h b/src/openvpn/error.h index 533354b3..66c1722e 100644 --- a/src/openvpn/error.h +++ b/src/openvpn/error.h @@ -37,8 +37,8 @@ /* #define ABORT_ON_ERROR */ -#ifdef ENABLE_PKCS11 -#define ERR_BUF_SIZE 8192 +#if defined(ENABLE_PKCS11) || defined(ENABLE_MANAGEMENT) +#define ERR_BUF_SIZE 10240 #else #define ERR_BUF_SIZE 1280 #endif