Skip to content

Commit

Permalink
tty: n_gsm: fix incorrect UA handling
Browse files Browse the repository at this point in the history
commit ff9166c 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: e1eaea4 ("tty: n_gsm line discipline")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220414094225.4527-20-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
dstarke-siemens authored and gregkh committed May 9, 2022
1 parent 9cd2e69 commit 4eae80d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/tty/n_gsm.c
Expand Up @@ -1865,7 +1865,6 @@ static void gsm_queue(struct gsm_mux *gsm)
}
}
break;
case UA:
case UA|PF:
if (cr == 0 || dlci == NULL)
break;
Expand Down

0 comments on commit 4eae80d

Please sign in to comment.