linux-stable/drivers
Daniel Starke 398867f59f tty: n_gsm: fix wrong command frame length field encoding
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.6.1 states that each command frame shall
be made up from type, length and value. Looking for example in chapter
5.4.6.3.5 at the description for the encoding of a flow control on command
it becomes obvious, that the type and length field is always present
whereas the value may be zero bytes long. The current implementation omits
the length field if the value is not present. This is wrong.
Correct this by always sending the length in gsm_control_transmit().
So far only the modem status command (MSC) has included a value and encoded
its length directly. Therefore, also change gsmtty_modem_update().

Fixes: e1eaea46bb ("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-12-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-15 08:36:05 +02:00
..
accessibility
acpi Merge branch 'acpi-bus' 2022-04-08 19:50:44 +02:00
amba
android
ata ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back 2022-04-06 11:08:04 +09:00
atm
auxdisplay
base
bcma
block drbd: set QUEUE_FLAG_STABLE_WRITES 2022-04-06 13:07:53 -06:00
bluetooth
bus
cdrom cdrom: remove unused variable 2022-04-06 08:47:52 -06:00
char random: check for signals every PAGE_SIZE chunk of /dev/[u]random 2022-04-07 01:36:37 +02:00
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl cxl/pci: Drop shadowed variable 2022-04-08 12:59:43 -07:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu drm-misc-fixes for v5.18-rc2: 2022-04-08 09:22:16 +10:00
greybus
hid
hsi
hv hyperv-fixes for 5.18-rc2 2022-04-07 06:35:34 -10:00
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband RDMA/hfi1: Fix use-after-free bug for mm struct 2022-04-08 15:40:06 -03:00
input
interconnect
iommu iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-08 11:16:29 +02:00
ipack
irqchip irqchip/gic, gic-v3: Prevent GSI to SGI translations 2022-04-05 16:33:47 +01:00
isdn
leds
macintosh
mailbox
mcb
md
media
memory
memstick
message scsi: message: fusion: Remove redundant variable dmp 2022-04-06 22:28:07 -04:00
mfd
misc habanalabs: Fix test build failures 2022-04-04 17:03:04 +02:00
mmc mmc: core: improve API to make clear mmc_hw_reset is for cards 2022-04-08 11:00:08 +02:00
most
mtd
mux
net MMC core: 2022-04-08 06:37:11 -10:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci hyperv-fixes for 5.18-rc2 2022-04-07 06:35:34 -10:00
pcmcia
peci
perf perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant 2022-04-08 14:17:57 +01:00
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi scsi: megaraid_sas: Target with invalid LUN ID is deleted during scan 2022-04-06 22:58:17 -04:00
sh
siox
slimbus
soc
soundwire
spi ACPI updates for 5.18-rc2 2022-04-08 18:23:02 -10:00
spmi
ssb
staging staging: r8188eu: Fix PPPoE tag insertion on little endian systems 2022-04-04 16:35:20 +02:00
target Merge branch '5.18/scsi-queue' into 5.18/scsi-fixes 2022-04-06 21:46:54 -04:00
tc
tee
thermal
thunderbolt
tty tty: n_gsm: fix wrong command frame length field encoding 2022-04-15 08:36:05 +02:00
uio
usb
vdpa virtio: fixes, cleanups 2022-04-05 10:40:52 -07:00
vfio
vhost
video fbdev: Fix unregistering of framebuffers without device 2022-04-06 21:12:28 +02:00
virt
virtio virtio: fixes, cleanups 2022-04-05 10:40:52 -07:00
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile