Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4610298iob; Sun, 8 May 2022 19:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL48iaZTZpPdLuRV0Q+ogK3ySaowvFcSSI8ZiozKxWGoJ/J0iaTqEA3oA3axMfVeeOXGoq X-Received: by 2002:a17:902:ccc5:b0:15e:f75e:6ce with SMTP id z5-20020a170902ccc500b0015ef75e06cemr9757209ple.104.1652062092860; Sun, 08 May 2022 19:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652062092; cv=none; d=google.com; s=arc-20160816; b=0tcV4131uW+atuS83ZZZKZswZjNvgNQ/NqvFY7PGm+LxB4fNQ6o5Fzi1DDQVsK3WZC RdZpUuG0VjVzqFH2UakkAjJqRmb4IN4qG81AcLSCiNblDL1mlOsH8yoMZU55kz5lIHTR 4DV+2Gb+vA+c04i1vdV6WSTkKavb/nRf6Vm16LNTA5ItugurOLUUHu6Y/dDjqgyHXDCJ gEjpqz2oVcxMPoHU1DlaBNNxwRDMlTCg/XGFk4xoPdR8MDQUWToklETcY4ZPeZ2e9AjX R/6H0RqQ/Ki9OMnFKgq/FsFWKQE3oMUS2DSNcr5qt5QS/RyD0bq8Y95gRm9rRKqa3nCz GWLA== 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=ggSHab47u5bZdtQMLlpnFFVeop7pXOHVq8hfwGlFI1k=; b=pJZhSjr8yZgUntgc9qH/gzT/kb/N3Rtv+KBtn+1oYnxeXQwYySFq9uk3nduOM7/TtB RynDY+/Xd3Aak1uHuXJkNpOfwDSbQswRHUkqWHnyeCeptAoDwd0lXqaR5r+9gURe9dEW 8wgXzbVRxju4HmrkLPXVJnXDiCh0Bf751a6OWU68zvuPdQrtkATQBDvjHGaZlvYBy7eF blGUGIQ2ZzeLhV6gAvXQdCC0HzoV7bz7s1TtTk/II258p4RlD73JgA7L0Z3bZnT05Esg ALUko/xNYzvdWoMm0vUzz2UMEff6VKDGl4nnEznyhHNRFIfmmdN2LV/TDc/5LYYOSYnV 3TvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DER4vhqK; 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=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f19-20020a056a00229300b005107be11e23si10772792pfe.137.2022.05.08.19.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:08:12 -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=@linuxfoundation.org header.s=korg header.b=DER4vhqK; 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=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 103554D246; Sun, 8 May 2022 19:08:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356529AbiEDRNx (ORCPT + 99 others); Wed, 4 May 2022 13:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354998AbiEDRDs (ORCPT ); Wed, 4 May 2022 13:03:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB7734D9E8; Wed, 4 May 2022 09:52:38 -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 8150961794; Wed, 4 May 2022 16:52:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBA75C385AA; Wed, 4 May 2022 16:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683139; bh=Y0Bi39iTWz4cj+MRckiLDH8gQu2Z0CGTg8tiDnDMg9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DER4vhqKCqLjyjXHvOlC/b9x5qRYPIbjTH3xQhethf7F/+M2zHHp1fB8SsrGC8zdS kxmsRjZcFjln8CyyXVrEFee4v2yaDFwNFduD5B6T34t/446dTAwUSbpgP8qsGJ+c42 2jutqw+T2w5KW9dPxBbp8wTDxnhxD6iu9o8AFe68= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Starke Subject: [PATCH 5.10 127/129] tty: n_gsm: fix incorrect UA handling Date: Wed, 4 May 2022 18:45:19 +0200 Message-Id: <20220504153031.655306116@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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=unavailable 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 @@ -1817,7 +1817,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;