Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1029612pxb; Fri, 15 Apr 2022 18:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywVtmRbiIrN6vsWyh8k4XWa6jozsdfYXYKDghCEpbk0fCMl40UqrerFecaxtdpxLD5BFO3 X-Received: by 2002:a17:90a:4405:b0:1cd:5fe6:dd99 with SMTP id s5-20020a17090a440500b001cd5fe6dd99mr1735391pjg.210.1650074127216; Fri, 15 Apr 2022 18:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074127; cv=none; d=google.com; s=arc-20160816; b=nHNVdIzVULXsI+WqCMbMSBV+PA9SDbnkFruB2qKEbKHTeQdXTYscSBmtLyxMtwlkHL dv1UXZd12lMlJZY/H3vhFeYGN8TPJM3bXoOvlI2Pp6xwAnp0VAw0Oe3cWfYZ08XVp07z SLldDDZAthGsVKINMr3+7JhxMtmMEXPkDwHiULRpLRKqbKElsxnakJ2nHxcrL38eMkeh d5ONJGDAPPuIVqo6TI1CI2+WKlbrUE5YvyIA/1aDhiTD+q17N7b241Ah2NZMUyAx+Rwo dKhPUWhfX/M8CRdoAONbaa5DS3RcUVssVLjlZnNgJi8yzZ2xzGIPHjBdWA7788RVuGTt iceQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=d8jKoM9faKsGDQmqC/btc4Rd+AthsQGvuIMNUMeUktA=; b=CcGcQNNuMYujRyrcVXO9cB62IBjSkH89zDXx1fcmRjBW40XwyGfwrO6gwrd7TE4Hzv 41jShTFY2qElW8mxuMwiG2Y+m5udCdtuI7mbEgVdeeG6L30O+4xvCncepywOgjOhqStw bw5YmDX7CBeGWLiKc5Yn6rdlF26W+sM5Ie63MC8jUjxgtmr+yRx45uHkngFUH0N/m/kZ wBy0El/g7mBaP07C51KNESB9LGb0VufLRkSuaJRvm3vD9Rky5OWxjWIbkiP94751VleR QRJBCq+asniO32XoZ1u5196Hv9a8ODBpbWTexjABKVuoWBya0jgFBJB1IpYbXu48iUzu Rn3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=bnygzUD5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l30-20020a63701e000000b00382a08a885dsi3355002pgc.362.2022.04.15.18.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:55:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=bnygzUD5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EFC2F19BFF2; Fri, 15 Apr 2022 18:17:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242000AbiDNJtB (ORCPT + 99 others); Thu, 14 Apr 2022 05:49:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241594AbiDNJq6 (ORCPT ); Thu, 14 Apr 2022 05:46:58 -0400 X-Greylist: delayed 61 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 14 Apr 2022 02:44:03 PDT Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net [185.136.65.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD1C710CE for ; Thu, 14 Apr 2022 02:44:03 -0700 (PDT) Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20220414094254ee00ff8e333c5c7a66 for ; Thu, 14 Apr 2022 11:43:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=daniel.starke@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=d8jKoM9faKsGDQmqC/btc4Rd+AthsQGvuIMNUMeUktA=; b=bnygzUD5p6LhzJ+6pWthHULcIJN48ylDv+Bvyl3FblVIRF+VXzJZnTWUwOH9Z3OZSE1tYH eyViCjnp2AZY4wZ8Nled9dCfHdzJlMDgDkDECHEfBYhYf88iOopLiNRbR8LYUc0rVNkwp70E LQqN0n4ufysRsTKmPQ7V+5Hipcxss=; From: "D. Starke" To: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-kernel@vger.kernel.org, Daniel Starke Subject: [PATCH 20/20] tty: n_gsm: fix incorrect UA handling Date: Thu, 14 Apr 2022 02:42:25 -0700 Message-Id: <20220414094225.4527-20-daniel.starke@siemens.com> In-Reply-To: <20220414094225.4527-1-daniel.starke@siemens.com> References: <20220414094225.4527-1-daniel.starke@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-314044:519-21489:flowmailer X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Daniel Starke n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.4.4.2 states that any received unnumbered acknowledgment (UA) with its poll/final (PF) bit set to 0 shall be discarded. Currently, all UA frame are handled in the same way regardless of the PF bit. This does not comply with the standard. Remove the UA case in gsm_queue() to process only UA frames with PF bit set to 1 to abide the standard. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Cc: stable@vger.kernel.org Signed-off-by: Daniel Starke --- drivers/tty/n_gsm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 1905a0fea89b..cf861598a646 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1871,7 +1871,6 @@ static void gsm_queue(struct gsm_mux *gsm) } } break; - case UA: case UA|PF: if (cr == 0 || dlci == NULL) break; -- 2.25.1