Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1452094iob; Thu, 5 May 2022 01:18:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh6YKeQBO/kjsVGo1g1P6gGP2wlcTdy/5N7KOeQRN3fp6vDyP0RqR1Gm/Tpnqxb3qQswtC X-Received: by 2002:a05:6a00:248d:b0:510:5d7d:18ab with SMTP id c13-20020a056a00248d00b005105d7d18abmr2442497pfv.51.1651738682957; Thu, 05 May 2022 01:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651738682; cv=none; d=google.com; s=arc-20160816; b=WXPfckjHcCX+AwFdsoOnXw25iIQNt7FrAeMxUP8xbrPQc+sc15OoXsLCH15Za79CfX ScbscJZiVjiCW9gbXNvwaN3OzzvapTptaopgec6fiUDRy09cYj45kiUlDz9XHIiXOBS5 nZM+kp2vOdeU67joGqy95G/k8iqx0Fp4rIX9VM4HkEcCRBX5SaxRy2nVEjmf/CATQPM/ RhjVY00E4jRKER3o+9n4HU5TNqgZ555A36gLszHJ3iujw19pECuisSBhyZ+V+hRHVN2W S3KIyArvtwNzVzcjl6rmn6HInBYFKXgIZkzE0Fbz4Kbk57iPZ3r2HSP73O+p9SwiLQQ1 joPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o9deeOhS7rHHG+x6jpL/RDRVuPq7rBoZTZWEcMbzwG4=; b=oIdAnWO6iIWbjtcIrwsqxEOPp+mK0lFbc3yiqEnW5b2zg0GbHYoII6md6T/tPpo+wI cZBfjyw8RL9VHUZjcpuSV+zCunsm6Jt/UB6PWFU5VHRBHq5VelbSzYp//fs5H1w6NFxj EstdY/UJKzEme/6oGHKioED9zqIMPdAaMLj5D4X6tsJ/LOxGxtDT1vZccoE1URasIqQD h79GXPgc1a/R6HmDCTV8/D+N0gS3z1ViLmfSv8uDa/ThA5nCcdJklaxud+MFyUZf1QGl 4a2KN+GHvlYnhXA7dkp3Cwz1aCyT2wbq3aSkUGMby4XvJz1ZOXvbJfEVw2ricGjeTaZw Vqxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EWFLSxTw; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m189-20020a6258c6000000b0050d4affda05si868051pfb.214.2022.05.05.01.17.47; Thu, 05 May 2022 01:18:02 -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=@linuxfoundation.org header.s=korg header.b=EWFLSxTw; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357967AbiEDR3i (ORCPT + 99 others); Wed, 4 May 2022 13:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356416AbiEDRJO (ORCPT ); Wed, 4 May 2022 13:09:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A4E349F27; Wed, 4 May 2022 09:55:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CCF2A61505; Wed, 4 May 2022 16:55:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27DD3C385A5; Wed, 4 May 2022 16:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683306; bh=y6+AhN97cqfn9F0f03PjRlxkvydZfldsY9kMaxQuHVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EWFLSxTwcWuPtYOXraSMFPVBxkgZgyr+Cl+JfbEZtaTmAUndMMcuPnkf+sjWS2uSj Xh0c1mbP3jgRTn3VWa8rhx5GtwRcgikTUTOZaRLgXGlYZNKHvPR1o4X0+H1QgM4YMj 9NGFuReST67fZUxC1icKwIe6ZReunWm9hJAuAqzQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Starke Subject: [PATCH 5.15 171/177] tty: n_gsm: fix incorrect UA handling Date: Wed, 4 May 2022 18:46:04 +0200 Message-Id: <20220504153108.917080162@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Daniel Starke commit ff9166c623704337bd6fe66fce2838d9768a6634 upstream. 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 Link: https://lore.kernel.org/r/20220414094225.4527-20-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/n_gsm.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1816,7 +1816,6 @@ static void gsm_queue(struct gsm_mux *gs gsm_response(gsm, address, UA); gsm_dlci_close(dlci); break; - case UA: case UA|PF: if (cr == 0 || dlci == NULL) break;