From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D20C4CEC4 for ; Thu, 19 Sep 2019 22:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4959B2196F for ; Thu, 19 Sep 2019 22:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931227; bh=1XQuFI0n56qS0vsiLu+pqai4I4rU+gXY33bYygv6ml8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=J8p7/1oYASwIZjYeVqofHxlHjkRNwC0PnGNHp1GAVnxXEUkozrWxQ3H3q9orqGPl5 HHSRrnWn6sWRLBG3Kb/FGRn4Px0iJeON8Xo0bipONx/rV4d4N+WlFICImBIFVBMJ5r +Z3O50FPaV6kzBf8FN+h5XdsNgXSQ7kOfi9zpQjs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390155AbfISWNp (ORCPT ); Thu, 19 Sep 2019 18:13:45 -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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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