This is a note to let you know that I've just added the patch titled tty: n_gsm: require CAP_NET_ADMIN to attach N_GSM0710 ldisc to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tty-n_gsm-require-cap_net_admin-to-attach-n_gsm0710-ldisc.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 67c37756898a5a6b2941a13ae7260c89b54e0d88 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> Date: Mon, 31 Jul 2023 15:59:42 -0300 Subject: tty: n_gsm: require CAP_NET_ADMIN to attach N_GSM0710 ldisc From: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> commit 67c37756898a5a6b2941a13ae7260c89b54e0d88 upstream. Any unprivileged user can attach N_GSM0710 ldisc, but it requires CAP_NET_ADMIN to create a GSM network anyway. Require initial namespace CAP_NET_ADMIN to do that. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230731185942.279611-1-cascardo@xxxxxxxxxxxxx From: Salvatore Bonaccorso <carnil@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/n_gsm.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -2827,6 +2827,9 @@ static int gsmld_open(struct tty_struct { struct gsm_mux *gsm; + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + if (tty->ops->write == NULL) return -EINVAL; Patches currently in stable-queue which might be from cascardo@xxxxxxxxxxxxx are queue-5.15/tty-n_gsm-require-cap_net_admin-to-attach-n_gsm0710-ldisc.patch