Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6292513iob; Tue, 10 May 2022 15:06:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJhdH2H9d4GkmU2Cj8ZDxSP9UQQKnUueW2u7Fx8oyQ6vXGVfsKT8r0xMO0g3PwCQNgldsu X-Received: by 2002:a17:907:2d10:b0:6f4:a700:6970 with SMTP id gs16-20020a1709072d1000b006f4a7006970mr22073997ejc.108.1652220368651; Tue, 10 May 2022 15:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652220368; cv=none; d=google.com; s=arc-20160816; b=RDTBXhWuz5uxKZMv2Hp3UAq60wnz6OimoiqHVbIs/+OjyxI9/a4jCMe2zGhQ4OZbTB n8Z5iXrQwIHaQLXvtlDxP72aJ1eQTvGl/fDv+2HJMjB+8gof0WHjazN/gcX/RXaHoNO8 ABewZej4hdWSaZPlQ0AIIvGnHxa/9UiLSyxge/i9Gj5jgGjx7qi3nJDiuGZa+rfcAexn pElHNWPOLsyWAB+F7yT0BNLfawkTGFqn+4E43JKRMjSJ4KDybpZ6QJdENV3lUpvpgOJ0 h1b9vTlDF8CAn16UTlzeYF6cHCc1xYyze1eCoIJtfOn/jRHxPegXaMFVzPIbEU4wrER+ eetA== 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=SMGvj4v5Hq9fFcI//2IJUWJMWaWNUaqlqgXLkzQI6mY=; b=DBhiIdoBtZraFk2x184GZcCAUxp0NF7lx+zejD9Vfu0B4F+rGdDlfagTeB8k/73xta PZ2TeqF3xYzAdaYwW3PGd9pgecYNkcvdBzy78CyxcF39mkq6hUf6hv9rf4C+3AHhe5tG PilXpSmYD3dAAyKyIdADWSs6Bogxfs0kUevzgWGr2G+ScXI5Vl4NId5Eo9gbzjKeKCEW Z7fAbhbah082ICBM7EVGvChymSROUl40Ko/al4b56mb/4t23EBcFLNZ4+jjXwrKGxufn A0+lGJu5x41tvHyrfdm5YKYpJxAWymG4OFbm9IZyVUJGIJK23/HLwbkKXphulgFMwLwT xnrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tMRrb0d1; 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 g22-20020a056402321600b00423f1342585si215041eda.455.2022.05.10.15.05.43; Tue, 10 May 2022 15:06:08 -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=tMRrb0d1; 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 S243185AbiEJN00 (ORCPT + 99 others); Tue, 10 May 2022 09:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243560AbiEJNWE (ORCPT ); Tue, 10 May 2022 09:22:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ECCA53A44; Tue, 10 May 2022 06:16:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 47C65B81DA3; Tue, 10 May 2022 13:16:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DCD2C385A6; Tue, 10 May 2022 13:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188576; bh=JJe8sEvxS5e9xUkxokihEGFI8ATuPtWVWFYdW0GQdmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMRrb0d1sEUFRA2c4bvzVkRGuxfwxmAiFSHYXdoy+YR+LOHTTBmgJGMPgrJ7Twxuo vPJEEjpx+/GG1lk0Pf4XWRQZ6dOUvnX/NF+9qkWrMZ4icaTZqp9D0fcF6dhO2XrVic jd0+YVmK9+Ilu9WCEl+6bT4g6428c/UMQwIpfykU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Starke Subject: [PATCH 4.14 52/78] tty: n_gsm: fix incorrect UA handling Date: Tue, 10 May 2022 15:07:38 +0200 Message-Id: <20220510130734.079029094@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.522479698@linuxfoundation.org> References: <20220510130732.522479698@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,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 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 @@ -1825,7 +1825,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;