anolis-cloud-kernel/drivers/char
Huai-Yuan Liu ee718045b3 ppdev: Add an error check in register_device
ANBZ: #12834

commit fbf740aeb8 upstream.

In register_device, the return value of ida_simple_get is unchecked,
in witch ida_simple_get will use an invalid index value.

To address this issue, index should be checked after ida_simple_get. When
the index value is abnormal, a warning message should be printed, the port
should be dropped, and the value should be recorded.

Fixes: 9a69645dde ("ppdev: fix registering same device name")
Signed-off-by: Huai-Yuan Liu <qq810974084@gmail.com>
Link: https://lore.kernel.org/r/20240412083840.234085-1-qq810974084@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: CVE-2024-36015
Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4997
2025-03-31 02:39:21 +00:00
..
agp x86/amd_nb: Unexport amd_cache_northbridges() 2024-05-20 08:33:43 +00:00
hw_random anolis: hwrng: zhaoxin-rng - remove redundant log information 2024-10-23 09:37:24 +00:00
ipmi ipmi_si: Phytium S2500 workaround for MMIO-based IPMI 2024-02-28 12:23:23 +00:00
mwave char/mwave: Adjust io port register size 2022-01-27 10:54:06 +01:00
pcmcia char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol() 2021-07-14 16:56:39 +02:00
tpm tpm: Clean up TPM space after command failure 2025-03-19 07:15:25 +00:00
xilinx_hwicap
xillybus
Kconfig random: credit cpu and bootloader seeds by default 2022-06-22 14:13:15 +02:00
Makefile
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c char: hpet: add checks after calling ioremap 2021-06-03 09:00:41 +02:00
lp.c Merge 5.9-rc3 into char-misc-next 2020-08-31 07:17:17 +02:00
mem.c anolis: mem: add devmem.enable_readonly parameter 2024-12-25 11:04:13 +08:00
misc.c char: misc: Increase the maximum number of dynamic misc devices to 1048448 2023-05-29 08:07:05 +00:00
mspec.c char: mspec: Use kvzalloc() in mspec_mmap() 2020-08-28 12:10:04 +02:00
nsc_gpio.c
nvram.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c ppdev: Add an error check in register_device 2025-03-31 02:39:21 +00:00
ps3flash.c
random.c anolis: random: speed up the initialization of module 2022-08-09 07:35:43 +00:00
raw.c raw: don't keep unopened block device around 2020-09-23 10:43:19 -06:00
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c
ttyprintk.c ttyprintk: Add TTY hangup callback. 2021-05-14 09:50:21 +02:00
uv_mmtimer.c
virtio_console.c virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 21:01:02 +02:00