Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp949079rwr; Wed, 26 Apr 2023 08:16:54 -0700 (PDT) X-Google-Smtp-Source: AKy350b8mXdHg3yhfcUcAZ6+5bTesl7HeOLx25SeJxnHkdsKj8PN0Nc5dUg2T1E+le6fL0ESOivN X-Received: by 2002:a17:903:32c1:b0:1a9:5093:a604 with SMTP id i1-20020a17090332c100b001a95093a604mr21460378plr.18.1682522213849; Wed, 26 Apr 2023 08:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682522213; cv=none; d=google.com; s=arc-20160816; b=FWhK/VtECESqtKQnY0wLzYm+gvUtgCT8HjrXh456wvMMb7WaRSAQsZdJYaW1cEFz9x 4Rq0FO0S6DRBeFVPGTIjhKF/XghBsEWcXa5U6sIuJWGd7IIRonhXDYvaJTtRSymTio05 4thIzJrS7nziZwTfHsylVN5yoG2uBn9KdMdCNbJ8Ra8UfoMZKz0YjlVzH2gBx7pmpQru ExZl8qAMuE8mIF3jE1DkQuSK/POKlie7l+voqHimQHXHii20HTwOrlUBvKXaCLD7fHO3 xcLBA0aMDNEgTeKZPXGlmY2aF97FBrbzseGymM+M6T46ONNfUqko0pWsLj3XagfOGf2W CCOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-filter; bh=MedIm+CRBEd4wBFXItt1kJMETQQkrwjcl8xl77kiovM=; b=RLuU86uW3cuDzpqMVgIBYgRsiYvHrB2MeA/d8qFaNDYWWcpMru9Oegzpk03qNiCOqo 228MyXGuGenuG/NMGJNfGHld4snC0AZ71fmJwDzRdc7lxP4f9ngjx3Qf1DAihTTT2HiP zCMK8YlTDtBj6o1zo+14A7pclXtg1JifPMD11tU8wERARgKL+7++MTW/MyB5s2rMlLio izNNpzdDT8pRZ/lGH5kguwjUAJE7uh+3TsjGBD4PAoQzDDrddqbDtYhW5kmtsrPneT3d 3fKfPm4f5wK+/9JOT+CWe3ABLQpjR3nEVItwHKtO5RLENusJBMUVPQ8nihu7AdA6djyn 3WVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infotecs.ru header.s=mx header.b=HPLnLR4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=infotecs.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 11-20020a17090a098b00b00244b2aad680si16099313pjo.63.2023.04.26.08.16.36; Wed, 26 Apr 2023 08:16:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infotecs.ru header.s=mx header.b=HPLnLR4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=infotecs.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241218AbjDZPKZ (ORCPT + 99 others); Wed, 26 Apr 2023 11:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240792AbjDZPKV (ORCPT ); Wed, 26 Apr 2023 11:10:21 -0400 Received: from mx0.infotecs.ru (mx0.infotecs.ru [91.244.183.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C1F87ED for ; Wed, 26 Apr 2023 08:10:18 -0700 (PDT) Received: from mx0.infotecs-nt (localhost [127.0.0.1]) by mx0.infotecs.ru (Postfix) with ESMTP id 7B92A1085789; Wed, 26 Apr 2023 18:04:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx0.infotecs.ru 7B92A1085789 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infotecs.ru; s=mx; t=1682521472; bh=MedIm+CRBEd4wBFXItt1kJMETQQkrwjcl8xl77kiovM=; h=From:To:CC:Subject:Date:From; b=HPLnLR4ts/3Y8SbFjB0Xawyp50TRlwaIt4fceP1t8BbvQc4lgJQTqtFLVJozsO5Ij VKwm55CT0gqEPbRGtPFD/DevevAQJ4l2OrJI+CZFIC0VIPXp4rEzoSX/Z1tj10yAJ9 +cgB2C/GewAMwc9RQ2DAVXqp7dFsFtsLBt6mcWEc= Received: from msk-exch-02.infotecs-nt (msk-exch-02.infotecs-nt [10.0.7.192]) by mx0.infotecs-nt (Postfix) with ESMTP id 754A4305F450; Wed, 26 Apr 2023 18:04:31 +0300 (MSK) From: Gavrilov Ilia To: Pablo Neira Ayuso CC: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Patrick McHardy" , "netfilter-devel@vger.kernel.org" , "coreteam@netfilter.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lvc-project@linuxtesting.org" Subject: [PATCH] netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value. Thread-Topic: [PATCH] netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value. Thread-Index: AQHZeFBn+k9SKA6Ie0ib54vOLuLARQ== Date: Wed, 26 Apr 2023 15:04:31 +0000 Message-ID: <20230426150414.2768070-1-Ilia.Gavrilov@infotecs.ru> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.17.0.10] x-exclaimer-md-config: 208ac3cd-1ed4-4982-a353-bdefac89ac0a Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 177015 [Apr 26 2023] X-KLMS-AntiSpam-Version: 5.9.59.0 X-KLMS-AntiSpam-Envelope-From: Ilia.Gavrilov@infotecs.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 510 510 bc345371020d3ce827abc4c710f5f0ecf15eaf2e, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;infotecs.ru:7.1.1 X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2023/04/26 03:46:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/04/26 04:45:00 #21166225 X-KLMS-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ct_sip_parse_numerical_param() returns only 0 or 1 now. But process_register_request() and process_register_response() imply checking for a negative value if parsing of a numerical header parameter failed. Let's fix it. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0f32a40fc91a ("[NETFILTER]: nf_conntrack_sip: create signalling expe= ctations") Signed-off-by: Ilia.Gavrilov --- net/netfilter/nf_conntrack_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_= sip.c index 77f5e82d8e3f..d0eac27f6ba0 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -611,7 +611,7 @@ int ct_sip_parse_numerical_param(const struct nf_conn *= ct, const char *dptr, start +=3D strlen(name); *val =3D simple_strtoul(start, &end, 0); if (start =3D=3D end) - return 0; + return -1; if (matchoff && matchlen) { *matchoff =3D start - dptr; *matchlen =3D end - start; --=20 2.30.2