Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1012498ybj; Fri, 20 Sep 2019 03:45:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWmOEb+JL9iEqzdW9ce3sjiUGVNjOOzs6MB8JjER3evFryWFhfV2KV3AOXhRzoypo8+5/g X-Received: by 2002:a17:907:20c1:: with SMTP id qq1mr17906194ejb.87.1568976325359; Fri, 20 Sep 2019 03:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568976325; cv=none; d=google.com; s=arc-20160816; b=zOxYqjDeP0t3isg5130AlhGJ0yzoGZbsBWSByelqoYm065JKCrsJGQhstCR0DRgRql 72w+zBKHS3L8yKqXodQAs3h9ADC3TsGD39kD3bKRPR8ONAa6FbFHbfj4Lid89IAfiGEM +oexk7+lBtx377p+svtmaD2UNlQmmG3t0VjjXkXlcsC9HTYzcU6Mq0I0nAAFJ0qvEnbR wpmyZlzyb90v1FQ94RIScFb5hFJGrwuh8mCxLvrJYiS4czG0+wrsymmIwmigRHdTzMEO 7zU4s6mDmOeSuam8jHrnUDNtNBQ543DmgKuu0FOmL36ZUNK1beSysYMi5HWY4T9V8tsA w/hQ== 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=70U26a12iQ7QWYjiQX9sdwS8fHemledI3DYO+9HPJd8=; b=WKr5vYuvFz2MtY6Gn/7h0jaYMJ/z7g26+VV5L6MTl0G4T9bZOPNwM6bhLmXHK60vBC 3vPHym9ULEOvmazAJ3n9IxSIhm7zvOJtcsalySnlmYQF30A/zTjgegX1Rt/AyYERrYRX 8XsPYolSV97ojvdxrYeGxnmEPNz3YxL8J8/rNFHMioevO2QQFxJhbs5Avin/fQoCjqve pve0E5dBLDDt3dcGrRiMzomcbXsS25eQI4wao2mgXtZt1oecRfmj3zS8Dwd7OeM4PkXc MqfF+RBFGayGlsFL1PV4OEhkkzbfJRAslZIYKjCQy7UixcKkSFuL3pnGrAVJLDqonFkQ r4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GgFM/Yj5"; 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 e46si1045829eda.401.2019.09.20.03.45.01; Fri, 20 Sep 2019 03:45:25 -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="GgFM/Yj5"; 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 S2391332AbfISWNr (ORCPT + 99 others); Thu, 19 Sep 2019 18:13:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:52916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404354AbfISWNn (ORCPT ); Thu, 19 Sep 2019 18:13:43 -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 1A1E721928; Thu, 19 Sep 2019 22:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931222; bh=1XQuFI0n56qS0vsiLu+pqai4I4rU+gXY33bYygv6ml8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GgFM/Yj5NhX8qldbFnT5DBiyRXeCEL+64WOqR75K3qCG1pJKXFPPOCDwOqkKfpnk5 Ck7h6K/HwQvZrwxHgFeErHppfi+UMj48Q2d1IfAGqm7YTTC+ah8tPo3EWuLKjHdnd5 B4eoo7+0ev2iZ3klUNysq1A5xn6ZONJUFDy3fih4= 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 4.19 48/79] netfilter: nf_conntrack_ftp: Fix debug output Date: Fri, 20 Sep 2019 00:03:33 +0200 Message-Id: <20190919214811.777892876@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214807.612593061@linuxfoundation.org> References: <20190919214807.612593061@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 a11c304fb7713..efc14c7b4f8ef 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c @@ -323,7 +323,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