From patchwork Wed Jun 28 02:08:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 106489 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp467995qge; Tue, 27 Jun 2017 19:10:00 -0700 (PDT) X-Received: by 10.84.234.16 with SMTP id m16mr8876363plk.41.1498615799944; Tue, 27 Jun 2017 19:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498615799; cv=none; d=google.com; s=arc-20160816; b=Q1e21qsTzdqDybx/rOR3PMORlDMpkHthpWKI76ILUCOnqADbszBjcciXxDVxLzdvG7 OmbkYknQEAeLarb+ninPYwQai6JDwCmvEOJYj7ExLa/l3Ywzm8FFThie6smem/dYOAiU t7cpa6d22lZz+EGhQpQUz/KF+EXBSDExSBmgFsQ/G2prZVKcM5x6JUcIGllo3iM667jO YL4UUx1MMztHCKqYYn7bkziHu3lw0oWk8LbZUYdYHarGhsK9b0nwt2nG/iIT8NiyKnOY 36fGVo4+IK2eX5xQO5oYEDGtEWzkVrnf+H7Uz6Azf8USTN8W5mFPLSm2lqVTME7xq1eW 8NiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=sJ3UF5i2zKQDLzk4GK/RfdaZFx0StxjuulfrzPP7FOk=; b=FjgVmgJVpE4mTAJNmMNfiBm4597nVz+uOfB8XIhId2G/gqz7ZxNGfg6ZjE3GzGMmyq JwQJKAT0bz2fyyV9waeJiOpu6m38Gw6DWQ8s9jitFMMXkt58Gnc+KLKK0V4asAzj2s6O 7Yt0X7p69HMi1BlWla+AhBLXvO9fxSW4Jy9/a78u3JlvSE6ay62wvKxWaBP6IS5genup ypBKv+oEEa3Z456fNk+TxX2hWy+MgOpEUsKbK415lzrth7EIItuuyaagU6Q4MpkNdLSj OLVeJkJgqrPhyIe79LUMHnXBO9IBSalqZwrdWUgZsQ7VjDMQpjtE49iDblsyvbhWt3I7 m6pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=e3aqVTX0; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s70si531969pgc.555.2017.06.27.19.09.59; Tue, 27 Jun 2017 19:09:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=e3aqVTX0; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0A5EB781D3; Wed, 28 Jun 2017 02:09:20 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by mail.openembedded.org (Postfix) with ESMTP id 6CB9D78049 for ; Wed, 28 Jun 2017 02:08:50 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id d5so6963470pfe.1 for ; Tue, 27 Jun 2017 19:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5UtqLvisJZsrSgsXxAdoaCD4GNVoFWb1WF5HKqe0pq4=; b=e3aqVTX0gpvtTwFfciaKZD1ZSJhy+pI32mDPbuQCmK7o/JPUnN66pB48mSqttU9b60 LNECS/doUH6sD3CEwTwbaJR42vm7L0yzrw/gPCuPX2MpIj++IPi+YwQcllpitsn1N2k8 AdqV5XWqvl3FpB7byRVrXrs97drYoLa9yf1Ef6ar58IdZ6mNCYtKdX7M5UIu9e7ZnRln cGKQZk5g+WRb11MbcgSgBr/P8krwCTpOMSrC5u4l+BDF08TF/7bpNgQad3paVB1NOdTm 1G7tmYXplluB8foJh9ZWF9an5oyeSi4WCDKHjg2b/xdFnbu5lYZc7/Qsla0aDbdZKLGm blYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5UtqLvisJZsrSgsXxAdoaCD4GNVoFWb1WF5HKqe0pq4=; b=SYE/4sofMK9dy1wlWsRkVOZRSvTn4GNTNWRcuh1dpVbsq3y0Wq7Gy7YET/Vaus+Uvx f5bEGYfclyvGzrAev6GgfiBTxDlsP4RdTRtVffou9wgD89XphVw4jSVlMUiiBzxasoH4 2Ybftgn2JmDNnhVqPnlDRzUBIGSaLJwE/YjvOEeBgoAXbgcoZv54QdoaZTu7Es5Oig+Y x2iB3fxVTRVtHchfAvhjuAAPrVs8wUG44DePoGAm+iLdprNIuTdmB0NCKvOUTM4XTmtW gqFHbwzObRtcaxk71/Uv9TawhjpCuF8UfHhW+cWwYlfDFv7BpcUDnYwraB8l78xo/1Bb IywQ== X-Gm-Message-State: AKS2vOwokY+XyrZzS9NYrdbbeDIuMnxWJasDnewJzp0g2AYNqGn3yuoo I0KG0Ftz7hHBc/yt X-Received: by 10.84.254.78 with SMTP id a14mr8735186pln.69.1498615731165; Tue, 27 Jun 2017 19:08:51 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::3df3]) by smtp.gmail.com with ESMTPSA id b8sm1003591pfd.65.2017.06.27.19.08.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 19:08:49 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 27 Jun 2017 19:08:14 -0700 Message-Id: <20170628020819.17047-8-raj.khem@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170628020819.17047-1-raj.khem@gmail.com> References: <20170628020819.17047-1-raj.khem@gmail.com> Subject: [oe] [meta-networking][PATCH 08/13] netkit-telnet: Fix build with hardening X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...1-telnet-telnetd-Fix-print-format-strings.patch | 66 ++++++++++++++++++++++ .../netkit-telnet/netkit-telnet_0.17.bb | 11 ++-- 2 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch -- 2.13.2 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch new file mode 100644 index 000000000..f2f1b12e2 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch @@ -0,0 +1,66 @@ +From 7a3095d1e9b7c73f9dca56250f433bcfc7cb660e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 10:15:34 -0700 +Subject: [PATCH] telnet/telnetd: Fix print format strings + +Fixes build with hardening flags + +Signed-off-by: Khem Raj +--- + telnet/utilities.cc | 6 +++--- + telnetd/utility.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/telnet/utilities.cc b/telnet/utilities.cc +index 66839ab..36f0731 100644 +--- a/telnet/utilities.cc ++++ b/telnet/utilities.cc +@@ -583,17 +583,17 @@ void printsub(int direction, unsigned char *pointer, int length) { + case ENV_VAR: + if (pointer[1] == TELQUAL_SEND) + goto def_case; +- fprintf(NetTrace, "\" VAR " + noquote); ++ fprintf(NetTrace, "%s", "\" VAR " + noquote); + noquote = 2; + break; + + case ENV_VALUE: +- fprintf(NetTrace, "\" VALUE " + noquote); ++ fprintf(NetTrace, "%s", "\" VALUE " + noquote); + noquote = 2; + break; + + case ENV_ESC: +- fprintf(NetTrace, "\" ESC " + noquote); ++ fprintf(NetTrace, "%s", "\" ESC " + noquote); + noquote = 2; + break; + +diff --git a/telnetd/utility.c b/telnetd/utility.c +index 29b7da1..75314cb 100644 +--- a/telnetd/utility.c ++++ b/telnetd/utility.c +@@ -909,17 +909,17 @@ printsub(char direction, unsigned char *pointer, int length) + case ENV_VAR: + if (pointer[1] == TELQUAL_SEND) + goto def_case; +- netoprintf("\" VAR " + noquote); ++ netoprintf("%s", "\" VAR " + noquote); + noquote = 2; + break; + + case ENV_VALUE: +- netoprintf("\" VALUE " + noquote); ++ netoprintf("%s", "\" VALUE " + noquote); + noquote = 2; + break; + + case ENV_ESC: +- netoprintf("\" ESC " + noquote); ++ netoprintf("%s", "\" ESC " + noquote); + noquote = 2; + break; + +-- +2.13.2 + diff --git a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb index 9438adc0f..54a58c8a1 100644 --- a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb @@ -5,11 +5,12 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef" SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \ - file://To-aviod-buffer-overflow-in-telnet.patch \ - file://Warning-fix-in-the-step-of-install.patch \ - file://telnet-xinetd \ - file://cross-compile.patch \ -" + file://To-aviod-buffer-overflow-in-telnet.patch \ + file://Warning-fix-in-the-step-of-install.patch \ + file://telnet-xinetd \ + file://cross-compile.patch \ + file://0001-telnet-telnetd-Fix-print-format-strings.patch \ + " EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \ MANMODE=644 MANDIR=${mandir}"