Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp953220ybj; Fri, 20 Sep 2019 02:41:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqysmweG2zh8rZp8kqeDeshY/LSqxIpYqtQEqOplUWr5/IakA44CHLww8cRpAYs470eH7nlO X-Received: by 2002:a17:906:2f92:: with SMTP id w18mr17634651eji.33.1568972518511; Fri, 20 Sep 2019 02:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568972518; cv=none; d=google.com; s=arc-20160816; b=u+J+WcX8aPcZa6ALKZCNEqXDuAGe+hKAJw7bEQrQBDiEQROpuuGLSN8Cxjw1ilMtaE SGrdo1Ex2O7IZfb3/kRmxyR1IVc3h1JzUKQCaLX2yTPQdGCH44mtT6q/R2XiIcEX9+pQ MzBzIdCPdnrzShi8rfAU6dTk3WpnF0/yUdF7MWnzu0esEIlydZucGEgbU8tNmWmAtVqN QGhaDruoVG6uawcSPWbKSnvjjar/0CfJpDa+TzZ4bnV8v5llo+7HHHWFgZqSxD0BhXG7 R0dW+uElxV8SCDjbxhakYtBz9ymKDpZmk1ApJ2J6lO1b3Cd2d2CtickOADw7KRbZWAvA xSxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1x+I1uikBc5VzoLuAoQpKranE11DlxVzYoLB0PzhO7U=; b=ytpKfhQFAwnJtz382xeb/VSfH+YIkhp8ag7bKWtIRjZ5m6z/el6CdM+0NGahz4mwAZ n+QrgmjtbP801iTZ4lRXx2p6mw7cy5tDw7llyx1yZwUiy//LmoECQycRmzKlxqASMwNy nzR3JBp1o/OrErUMLMx69qFuElJEqpMgld0Vd6YQ13Qw8hiB3k7ZVFf8LqQSciG4ePvA W6ZV4pg/SE+F4I4YgBbK9+toOmNJkyf3mmmPgY183J1FYAgmjMcyUy9dOHhqiYSAWYmc 0mwwGx07QtCnjrjgqPfYh05hv21UG9zJUy8/F9jTbwcp8aak/FQWi8R7nys5P4Gc71FD wayA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cH/w5/Xn"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq24si743423ejb.202.2019.09.20.02.41.32; Fri, 20 Sep 2019 02:41:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cH/w5/Xn"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405727AbfISWKl (ORCPT + 99 others); Thu, 19 Sep 2019 18:10:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:49028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405712AbfISWKh (ORCPT ); Thu, 19 Sep 2019 18:10:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E900321907; Thu, 19 Sep 2019 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931036; bh=csKgyx9cIvcyBdEkZTLKA3ImSwmlRCwcW6veHW3zcEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cH/w5/XnR3vGgCCsjL7i4eY1pzxWn4vyIgKTAW+vd+VMvQNIe+eSovXGwa0UxdGLE 1xAjk+CpB4YC/6umHyXtQLvviq+IW02dZNYIQ7MJqPjh7gFlzli4+qf6PA8HMOuRCg 4rCRZXgofVhhDFv9PlpoD5LP7to7rEhGY3akF1ic= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Jarosch , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.2 072/124] netfilter: nf_conntrack_ftp: Fix debug output Date: Fri, 20 Sep 2019 00:02:40 +0200 Message-Id: <20190919214821.620903152@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214819.198419517@linuxfoundation.org> References: <20190919214819.198419517@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Jarosch [ Upstream commit 3a069024d371125227de3ac8fa74223fcf473520 ] The find_pattern() debug output was printing the 'skip' character. This can be a NULL-byte and messes up further pr_debug() output. Output without the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to `<7>nf_conntrack_ftp: find_pattern `PORT': dlen = 8 kernel: nf_conntrack_ftp: find_pattern `EPRT': dlen = 8 Output with the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to 0x0 delimiter! kernel: nf_conntrack_ftp: Match succeeded! kernel: nf_conntrack_ftp: conntrack_ftp: match `172,17,0,100,200,207' (20 bytes at 4150681645) kernel: nf_conntrack_ftp: find_pattern `PORT': dlen = 8 Signed-off-by: Thomas Jarosch Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nf_conntrack_ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index 8c6c11bab5b67..b5df6c4c159cd 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c @@ -322,7 +322,7 @@ static int find_pattern(const char *data, size_t dlen, i++; } - pr_debug("Skipped up to `%c'!\n", skip); + pr_debug("Skipped up to 0x%hhx delimiter!\n", skip); *numoff = i; *numlen = getnum(data + i, dlen - i, cmd, term, numoff); -- 2.20.1