You need to sign in or sign up before continuing.
提交 7bf7ea44 编写于 作者: D Daniel Starke 提交者: Zheng Zengkai

tty: n_gsm: fix incorrect UA handling

stable inclusion
from stable-v5.10.114
commit 95b267271a7db5e6884de342ab0f2ccf77e220be
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=95b267271a7db5e6884de342ab0f2ccf77e220be

--------------------------------

commit ff9166c6 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: e1eaea46 ("tty: n_gsm line discipline")
Cc: stable@vger.kernel.org
Signed-off-by: NDaniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220414094225.4527-20-daniel.starke@siemens.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 8116373f
...@@ -1817,7 +1817,6 @@ static void gsm_queue(struct gsm_mux *gsm) ...@@ -1817,7 +1817,6 @@ static void gsm_queue(struct gsm_mux *gsm)
gsm_response(gsm, address, UA); gsm_response(gsm, address, UA);
gsm_dlci_close(dlci); gsm_dlci_close(dlci);
break; break;
case UA:
case UA|PF: case UA|PF:
if (cr == 0 || dlci == NULL) if (cr == 0 || dlci == NULL)
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册